Skip to content

Instantly share code, notes, and snippets.

@jay-zhuang
Created April 15, 2013 03:51
Show Gist options
  • Save jay-zhuang/5385582 to your computer and use it in GitHub Desktop.
Save jay-zhuang/5385582 to your computer and use it in GitHub Desktop.
sorted(customers, key=lambda c: c.name.last)
reduce(lambda x, y: x.balance + y.balance, customers)
map(lambda x: x*x*x, range(1, 11))
# [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
filter(lambda x: x%2 != 0 and x%3 != 0, range(2, 25))
# [5, 7, 11, 13, 17, 19, 23]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment