DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python sort list by custom function
from functools import cmp_to_key sorted(mylist, key=cmp_to_key(compare))
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#sort
#list
#custom
#function
ADD COMMENT
Topic
COMMENT
Name
7+1 =
Submit