Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to find shortest string in a list python

strings = ["some", "example", "words", "that", "i", "am", "fond", "of"]

print min(strings, key=len) # prints "i"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #shortest #string #list #python
ADD COMMENT
Topic
Name
7+1 =