this is the code its just following questions i have received but i have been asked to append all even numbers from list1 into list2 how could i achieve this
import random
list1 = []
for x in range(10):
print(random.randint(1,101))
list1.append(x)
list2 = list1
print(list1)
print(list2)
i have checked all over google cant find a page that can help me i have tried :
num = list1
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))