Kris Armstrong Kris Armstrong - 4 months ago 24
Python Question

Python Compare value in list 1 with value in list 2

I have created two lists in python list1 and list2.

I want to start at the first element in list 1 and search for that element in list 2 if it exists print something, if it does not exist print something else

I'm not sure how to march through list 1 and search list2 for value. I know this will involve a for loop.

for in list1

if values =

for item in list1:
    if item in list2:
        print 'yes'
        print 'no'