original_docstring: Function to check if the option given by the user exists in the menu.
docstring: Function to check if the option given by the user exists in the menu.
docstring_tokens: Function to check if the option given by the user exists in the menu .
code: def check_option(option, menu):
      """Function to check if the option given by the user exists in the menu."""
      if option.upper() == "Q":
          print(warMsg + "Exiting.")
          sys.exit()
      elif option in menu:
          menu[option]()  # Call option
      else:
          print(warMsg + "Option not found, please input a valid option.")
code_tokens: def check_option ( option , menu ) : if option . upper ( ) == "Q" : print ( warMsg + "Exiting." ) sys . exit ( ) elif option in menu : menu [ option ] ( ) else : print ( warMsg + "Option not found, please input a valid option." )
short_docstring: Function to check if the option given by the user exists in the menu.
short_docstring_tokens: Function to check if the option given by the user exists in the menu .
comment: """Function to check if the option given by the user exists in the menu."""$SEP$# Call option