Question: def short_words(my_sentence): Split a sentence into words and only print the shorter words Finish this function which takes a string (my_sentence) as input and
def short_words(my_sentence): """ Split a sentence into words and only print the shorter words Finish this function which takes a string (my_sentence) as input and print the words which has 5 letters or less. For example, if the function is called with "twinkle twinkle little star" as parameter, this function should only print: star Micro-credentials: - Using split() function to split a string into a list of strings - Using loops (both for loops and while loops) to visit all the items in a list """
#=======================================
short_words("twinkle twinkle little star") short_words("how I wonder what you are")
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
