I'm finessing a script and have encountered a problem.
def __str__(self):
"""Encourage the user to select a command."""
return "Welcome to *name of app*! . Press X to start."
I am able to use the letters on the keyboard as commands(here ex: "X"), but how do I do to use the space bar as a command?
Parts of the current code for commands, for your understanding:
while user_input != "q":
user_input = input("Welcome to *name of app*! Choose command:*commands*")
if user_input == "s":
self.show_commands()
elif user_input == "e":
self.new_task()
elif user_input == "d":
self.show_tasks()
elif user_input == "x":
self.mark_done()
Hopefully you will understand my problem
Grateful for your help
Thanks in advance