Skip to content

Instantly share code, notes, and snippets.

@kkt-ee
Created January 4, 2020 16:59
Show Gist options
  • Save kkt-ee/2db23e342a81c6a854c2972e85a11b15 to your computer and use it in GitHub Desktop.
Save kkt-ee/2db23e342a81c6a854c2972e85a11b15 to your computer and use it in GitHub Desktop.
"""
Simple, given a string of words, return the length of the shortest word(s).
String will never be empty and you do not need to account for different data types.
"""
def find_short(s):
# your code here
l = min([len(x) for x in s.split()])
return l # l: shortest word length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment