sort strings as numbers python
a = sorted(a, key=lambda x: float(x))
3.33
3
>>> b = ["949.0","1099.0"]
>>> b.sort(key=float)
>>> b
['949.0', '1099.0']
Thank you!
3
0
Are there any code examples left?
New code examples in category Python