python中如何编程求1到100之间的素数

如题所述

第1个回答  2015-06-28
[p for p in range(2, 101) if 0 not in [p% d for d in range(2, int(p**0.5)+1)]]

相似回答