check if 2 lists have same elements python code example Example: python compare lists unordered def compare(s, t): return sorted(s) == sorted(t)