'TypeError :List' object is not callable


It giving such error like - ‘list’ object is not callable
code :=
my_list = (1, 5, 4, 6, 8, 11, 3, 12)
new_list = list(filter(lambda x: x%2 == 0 , my_list))
print(new_list)

but using set its working.
my_list = (1, 5, 4, 6, 8, 11, 3, 12)
new_list = set(filter(lambda x: x%2 == 0 , my_list))
print(new_list)

Does that notebook, at some point, assign list to actually be a list?

3 Likes