Syntax behind sorted(key=lambda: …)
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
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