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)
Posted by Sybrand at Wednesday, March 19, 2014
Labels: programming, python

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Sybrand
View my complete profile

Blog Archive

  • ►  2018 (1)
    • ►  April (1)
  • ►  2017 (1)
    • ►  March (1)
  • ►  2015 (3)
    • ►  February (1)
    • ►  January (2)
  • ▼  2014 (6)
    • ►  October (1)
    • ►  August (1)
    • ►  July (2)
    • ►  April (1)
    • ▼  March (1)
      • Why I love Python
  • ►  2010 (3)
    • ►  June (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2009 (10)
    • ►  December (5)
    • ►  November (1)
    • ►  October (2)
    • ►  August (1)
    • ►  February (1)
  • ►  2008 (3)
    • ►  September (1)
    • ►  August (1)
    • ►  May (1)
  • ►  2007 (11)
    • ►  October (1)
    • ►  September (2)
    • ►  March (1)
    • ►  February (1)
    • ►  January (6)
  • ►  2006 (3)
    • ►  December (3)
  • ►  2005 (6)
    • ►  November (2)
    • ►  October (1)
    • ►  September (1)
    • ►  June (1)
    • ►  January (1)
  • ►  2004 (1)
    • ►  August (1)

Friends

  • Carli
  • Johan Jordaan
  • Olivia Pig
  • Timothy Twelves
Simple theme. Powered by Blogger.