티스토리 뷰

Python

Sorting lists by word length

techbard 2012. 5. 9. 17:28

Sorting lists by word length


http://www.daniweb.com/software-development/python/threads/54348/sorting-lists-by-word-length-how-do-i-do-it


words = sorted(words, key = lambda str: len(str))

댓글
댓글쓰기 폼
공지사항
Total
410,766
Today
35
Yesterday
44
«   2019/12   »
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 30 31        
글 보관함