List match

OriginalBrownster originalbrownster at gmail.com
Thu Aug 17 10:04:11 EDT 2006


Hi there:

I know this probably is a very easy thing to do in python, but i wanted
to compare 2 lists and generate a new list that does not copy similar
entries. An example below

list= ["apple", "banana", "grape"]
list2=["orange","banana", "pear"]

now I want to compare these lits and generate a third list after
comparison

list3 would be ["apple", "banana","grape","orange", "pear"]

hence the double entry would not show up?

Is there a way to do this??

Stephen




More information about the Python-list mailing list