I am very new to python and just wondering how to rewrite this code without using lambda so I get a better understanding of solving problems in different ways.
I want to print out only even numbers from this list:
my_list = [1, 5, 4, 6, 8, 11, 3, 12]
new_list = list(filter(lambda x: (x%2 == 0) , my_list))
print(new_list)
ouput: [4,6,8,12]