Sorry, I'm very much a beginner to python. What I want to do is see which list an item is in. What I have is some lists set up like:
l1 = [1,2,3]
l2 = [4,5,6]
l3 = [7,8,9]
And let's say I want to find which list the item 5 is in. What I'm currently doing is:
if l1.index(5)!=False:
print 1
elif l2.index(5)!=False:
print 2
elif l3.index(5)!=False:
print 3
But this doesn't work. How would I do this?