Skip to content

Instantly share code, notes, and snippets.

@drhanlau
Last active March 3, 2016 06:17
Show Gist options
  • Save drhanlau/955587bac2643edc8aad to your computer and use it in GitHub Desktop.
Save drhanlau/955587bac2643edc8aad to your computer and use it in GitHub Desktop.
Lambda testing
for x in range(0,101):
if (lambda i : not i % 2 and not i % 3 and not i % 4 and not i % 5 and not i % 6)(x):
print x
a = [(1,2,3), (4,5,6), (2,3,4),(8,2,6)]
sorted(a, key = lambda x: x[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment