I have been able to find a few articles on comparing 2 lists, but I have 4
lists that I need to compare. I need to find any repeated elements and the
list that they came from. For example,

list1 = ['one', 'two', 'three']
list2 = ['one', 'two', 'four', 'five']
list3 = ['two', 'three', 'six', 'seven']
list4 = ['three', 'five', 'six']


I need to be able to get along the lines of output:
Element 'one' contained in list1 and list2
Element 'two' contained in list1 and list2 and list3
...
Element 'five' contained in list2 and list4

etc.. and I can't quite figure out how to go about it
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to