🌈 搜索
📅  最后修改于: 2022-03-11 14:46:01.490000             🧑  作者: Mango
n = 20 primes = [i for i in range(2, n + 1) if all(i%j != 0 for j in range(2, int(i ** 0.5) + 1))] print(primes)