Contact: aviboots(AT)netvision.net.il
31,165 questions
40,721 answers
573 users
a_list = [1, 2, 5, 4, 2, 3, 2, 6, 7, 2, 2] for i in a_list[:]: if i == 2: a_list.remove(i) print(a_list) ''' run: [1, 5, 4, 3, 6, 7] '''