Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to find the longest string in a list in python

a_list = ["a_string", "the_longest_string", "string"]
longest_string = max(a_list, key=len)
print(longest_string)
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #find #longest #string #list #python
ADD COMMENT
Topic
Name
5+2 =