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