1 num_pri = [] 2 l=[] 3 for i in range(2,101): 4 for j in range(2,i): 5 if (i %j) == 0: 6 num_pri.append(i) 7 break 8 else: 9 l.append(i) 10 print(l) 11 12 print(num_pri)
1 num_pri = [] 2 l=[] 3 for i in range(2,101): 4 for j in range(2,i): 5 if (i %j) == 0: 6 num_pri.append(i) 7 break 8 else: 9 l.append(i) 10 print(l) 11 12 print(num_pri)