Random Stuff
Random notes and thoughts that may or may not be of use to someone.
Wednesday, March 19, 2014
Why I love Python
Reason #1
monkeys.sort(key=lambda monkey: monkey.height)
Reason #1.2
monkeys.sort(key=lambda monkey: (monkey.height, monkey.age))
Reason #1.3
monkeys.sort(key=lambda monkey: (monkey.height, monkey.age), reverse=True)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment