building a list from another list : None « Data Type « Python Tutorial






L1 = ['spam', 'spam', 'spam', 'A', None, 'spam', 'spam']
L2 = []
for i in L1:
    if i is not None:
        L2.append(i)








2.13.None
2.13.1.list-copy function using None
2.13.2.building a list from another list