Last active
March 3, 2016 06:17
-
-
Save drhanlau/955587bac2643edc8aad to your computer and use it in GitHub Desktop.
Lambda testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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