I have written the following Python code, but its throwing me an error
def myfunc(*args):
mylist = list()
for num in args:
if num%2 ==0:
mylist = mylist.append(num)
return mylist
It throws me the following error [-2, 4]!= None.
What is wrong with the above code?