Hello dear friends,
I have solved the question about purify but I have a question if you dont mind.
I would like to take a list of number from a user, and to test the question.
But I am searching for how I can take a list of numbers from a user?
As I know, by input(), I will have string and not int.
I can use int(input()) which do not work.
As you see in my code below, I have provided a list myself and my code works.
How if I need to take a list from a user?
Thank you in advance for any help from you <3
def purify(listi): new_list =  for i, n in enumerate(listi): if n % 2==0: new_list.append(n) return(new_list) my_list = [2, 3, 5, 6, 7, 8, 5, 87, 88, 45, 87] my_purify = purify(my_list) print(my_purify)