I want to write a function that would return the length of the shortest string in a string of words. Sample: \"I eat apples\" would return 1 since \"I\" is the shorted string. T
line = "I eat apples" mins = min(len(word) for word in line.split()) print(mins)
line.split() will split line into list of words and then just finding the minimum length
line.split()