Source Code:
(back to article)
original_list = [1, 2, 3, 4, 5] new_list = [i for i in original_list if i % 2 == 0] print(new_list) # [2, 4]
Result:
Report an issue