May-27-2018, 09:46 AM
You want to use set().
list1 = [1,1,1,2,3,4,5] list1 = set(list1) # unique elements list2 = [4,2,5,1,6,7,4] list2 = set(list2) # unique elements print(list1 & list2)https://docs.python.org/3/tutorial/datastructures.html#sets
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!