I am making a program to check how many even numbers there are in a list and printing the even numbers out. However, when I uncomment my last line to get user input, the program doesn't work anymore. But the second-to-the-last line does work. I am new to Python, how do I get my last line to work? I have researched but I still can't figure it out. Please help
evennums = []
def is_even(list):
amount = 0
for i in list:
if i % 2 == 0:
amount = amount + 1
evennums.append(i)
print(f"There are {amount} even numbers in this list. They are: {evennums} ")
#the following line works
is_even([1,2,3,4,10,11])
# The following line does not work
#is_even(int(input("Enter a list of numbers: ")))