Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 501 Bytes

Shortest_Word.md

File metadata and controls

33 lines (19 loc) · 501 Bytes

CodeWars Python Solutions


Shortest Word

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.


Given Code

def find_short(s):
    return l # l : len of shortest word

Solution

def find_short(s):
    return min([len(word) for word in s.split()])

See on CodeWars.com