Check if two lists are permutations of the one another ( Improvement)
You can also do:

from collections import Counter

def compare_lists(list1, list2): 
    return Counter(list1) == Counter(list2)


While list.sort / sorted has O(n log n) time complexity, constructing a Counter (which is a dict internally) is O(n). This is also an improvement over the solution in the question, which is O(n ^ 2). 

There is also a more efficient memory allocation involved if you do not want to mutate list1 and list2. Constructing the sorted list has O(n) space complexity, while constructing the Counter is O(k), where k is the number of unique elements.

If you wanted to make this function scalable to an arbitrary number of lists, you could do:

from collections import Counter

def compare_lists(*lists):
    counters = map(Counter, lists)

    try:
        first_counter = next(counters)
    except StopIteration:
        return True

    return all(first_counter == counter for counter in counters)


Now compare_lists takes a variable number of arguments, and would return True if all of the arguments are permutations of each other.