0

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)

22nd May 2017, 1:45 AM
juan ferrer
1 Respuesta