Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Program for length of the shortest word

def find_short(s):
    min_length = float("inf")

    for x in s.split():
        if len(x) < min_length:
            min_length = len(x)

    return min_length
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Program #length #shortest #word
ADD COMMENT
Topic
Name
8+4 =