Source Code:
(back to article)
my_list = [1, 2, 3, 4] my_list = [item * 2 for item in my_list if item % 2 == 0] print(my_list)
Result:
Report an issue