-
-
Save IndhumathyChelliah/938e032257b6b3d2229e1badf653a9d7 to your computer and use it in GitHub Desktop.
This file contains 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
from operator import itemgetter | |
d={'a':[1,2,3],'b':[3,4,5],'c':[1,1,2]} | |
print (sorted(d.values(),key=itemgetter(1))) | |
#Output:[[1, 1, 2], [1, 2, 3], [3, 4, 5]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment