Source Code:
(back to article)
my_list = [1, 2, 3, 4, 5] new_list = [x for x in my_list if x != 3] print(new_list) # Output: [1, 2, 4, 5]
Result:
Report an issue