title: How do you make a console application which accepts commands?
body: <p>I am relatively new to Python and programming in general. I am working on writing a console application.</p>
  
  <p>How do you write a console application that accepts commands in a terminal? For instance, like how a terminal itself accepts commands and does a corresponding task. Are the "commands" actually just functions in the application that are called by the user? Is the console interface itself just a function? E.g. :</p>
  
  <pre><code>def console_interface():
      user_input = input()
      if user_input == "some_function":
          some_function()
  
      if user_input == "some_other_function":
          some_other_function()
  </code></pre>
  
  <p>Although it is not efficient, I know the above works because I have tested it. Is this general idea correct or is it way off?</p>