Next we need to ensure that the user actually typed something.
empty_string = "" if len(empty_string) > 0: # Run this block. # Maybe print something? else: # That string must have been empty.
We can check that the user’s string actually has characters!
if statement that verifies that the string has characters.
- Add an
ifstatement that checks that
len(original)is greater than zero. Don’t forget the
:at the end of the
- If the string actually has some characters in it,
- Otherwise (i.e. an
You’ll want to run your code multiple times, testing an empty string and a string with characters. When you’re confident your code works, continue to the next exercise.