compare elements of 2 unordered lists python code example
Example 1: compare lists element wise python
[ x&y for (x,y) in zip(list_a, list_b)]
Example 2: python compare lists unordered
def compare(s, t):
return sorted(s) == sorted(t)
[ x&y for (x,y) in zip(list_a, list_b)]
def compare(s, t):
return sorted(s) == sorted(t)