compare each element in list python with itself code example
Example: python compare each item of one list
import itertools
for a, b in itertools.combinations(mylist, 2):
compare(a, b)
import itertools
for a, b in itertools.combinations(mylist, 2):
compare(a, b)