Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to select the shortest item in a python list

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

print min(strings, key=len) # prints "i"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #shortest #item #python #list
ADD COMMENT
Topic
Name
6+9 =