I am using the filter function for the first time and using a function to remove del_num from a tuple called num_list. However, it's not doing what I want. I am getting back the original num_list values. Appreciate any ideas on how to get this to work.
num_list = [1,2,3,4,5,8,24,24,54,78]
del_num = 24
def filter_list(num_list, del_num):
new_num =[]
for v in num_list:
if (num_list) == (del_num):
return FALSE
else:
new_num.append(v)
return new_num
result = filter_list(num_list,del_num)
print(result)