I'm getting confused as to why I cannot have a if statement within the for statement,
Going to try and clear this up sorry for not being clear.
lists = [1,2,3,4,5,6]
userList = []
for i in range(5):
userList.append(input("Please enter a number :"))
for L in userList:
if L in lists:
print("It is in it")
else:
print("It is NOT in it")
I would like it to print "It is in it" should a number from userList be in lists.
So any number the user enters between 1 and 6 will print "It is in it".
Also sorry for saying python 2, my mistake.