DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
sort strings as numbers python
>>> b = ["949.0","1099.0"] >>> b.sort(key=float) >>> b ['949.0', '1099.0']
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#sort
#strings
#numbers
#python
ADD COMMENT
Topic
COMMENT
Name
2+5 =
Submit