Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created June 24, 2020 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/938e032257b6b3d2229e1badf653a9d7 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/938e032257b6b3d2229e1badf653a9d7 to your computer and use it in GitHub Desktop.
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