티스토리 뷰

공부

[Python] Sort array Sting by int

seunggabi 승가비 2020. 2. 9. 00:02
list = ["1","10","3","22","23","4","2","200"]
list = [int(x) for x in list]
list.sort()

[reference] https://stackoverflow.com/questions/3426108/how-to-sort-a-list-of-strings-numerically

댓글
댓글쓰기 폼
공지사항
최근에 달린 댓글
Total
28,468
Today
5
Yesterday
49
«   2020/02   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
글 보관함