Is it possible to lexicographically sort a list of frozensets as in the following example:
sort_frozensets(frozenset(['d','b']), frozenset(['a','b']), frozenset(['z','a']), frozenset(['l',''m]))
#result = frozenset(['a','b']), frozenset(['z','a']), frozenset(['d','b']), frozenset(['l',''m])
So, it's ordered through the order of the first item, and if the first item is the same, then the second item is considered.
No, frozensets do not have an order, so you can't sort them. Find another data structure that fits your problem, we won't be able to guess it.