python sort string of numbers as integers code example
Example 1: sort strings as numbers python
a = sorted(a, key=lambda x: float(x))
Example 2: sort strings as numbers python
>>> b = ["949.0","1099.0"]
>>> b.sort(key=float)
>>> b
['949.0', '1099.0']