素数:只能被1或本身整除的数 list = [] i = 2 for i in range(2,101): j = 2 for j in range(2,i): if i%j == 0: break else: list.append(i) print(list)