> By default, the sorted function looks at the leftmost element of a tuple or other iterable, when sorting...
The way it reads, it seems like you're implying that sorted() does this:
>>> l = [(3, 2), (3, 1), (1, 1, 2), (1, 1)]>>> sorted(l, key=lambda x: x[0])[(1, 1, 2), (1, 1), (3, 2), (3, 1)]> You'll find some excellent overview of the magic methods in this essay by Rafe Kettler: A Guide to Python's Magic Methods. He's mostly looking at Python 2.7, so does not pick up on the __next__ method, however you'll be able to fill in the blanks thanks to this courseThis is unclear to me. What does the next() function do? How do I find the docs and source for it?
These are misspelled:> comparitor> compartor
These are great:- Something about sorted with a link to the docs would be a good addition.