Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sort key python

>>> sorted(student_tuples, key=itemgetter(2))
[('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)]
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #sort #key #python
ADD COMMENT
Topic
Name
5+6 =