Question: Use sys.argv and build a program, shortest.py, that has a function that takes in a string argument and prints a sentence indicating the shortest word
Use sys.argv and build a program, shortest.py, that has a function that takes in a string argument and prints a sentence indicating the shortest word in that string. If there is more than one word print only the first. Your print statement should read: "The shortest word is x" Where x = the shortest word. The word should be all uppercase. Sys.Argv must be used.
input() cannot be used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
