PANGDU 胖嘟
楊景皓的工作日記: linux, debian, mysql, vim, php, javascript, python
Friday, August 23, 2013
python get longest string in list
mylist = ['1','22','333']
print max(mylist, key=len)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment