I don’t quite understand the syntax behind the sorted() argument:

key=lambda variable: variable[0]

Isn’t lambda arbitrary? Why is variable stated twice in what looks like a dict?

10 Answers
10

Leave a Reply

Your email address will not be published. Required fields are marked *