New course! Every coder should learn Generative AI!
Try a free lesson0
lists
Could somebody explain me this piece of code if it is correct and how? Thanks L = [] nmax = 30 for n in range(2, nmax): for factor in L: if n % factor == 0: break else: L.append(n) print(L)
0 Answers