Feb-29-2024, 04:20 PM
Your solution does not "work". It works for the case where the user presses enter without entering anything, but what if the user enters "a" or " "? It is not much more code to make a solution that works for any input string. In doing so you would learn about Python exception handling which is an important thing to know.