title: Python Closing Immediately After Running Script
body: <p>I'm doing some very basic lessons on Python in an online class. I was given a print task to complete, but the issue is the cmd closes immediately after the script runs, so fast that I cannot read the output.</p>
  
  <p>I've done some searching and this is apparently a problem newbies have been having for a while but the solution is always to open the .py file manually using cmd - that is EXACTLY what I am doing and far from being a solution, is the exact cause of the issue. It does not do this if I click-open it with Python, and it does not close if I open it in IDLE. </p>
  
  <p>As instructed, I am navigating to, and opening manually from:</p>
  
  <p>cmd
  C:\Users\Me\Desktop\Python\myfile.py</p>
  
  <p>Python is set in the environment variables/been added to the PATH. To prevent confusion, it does open in cmd, waits for my input, accepts my input, and then closes. I'm clarifying because after reading many threads, the Python community always seems to be either utterly baffled by, or give degree-level explanations to, what seem to be very simple questions.</p>
  
  <p>Also for anyone wondering, I'm just running:</p>
  
  <pre><code>statement = input("Enter a statement to print: ")
  
  if statement == "Hello world":
      exit()
  
  else:
      print(statement)
  </code></pre>
  
  <p>As the task required we print anything other than 'Hello world'. I just want the output to stay open in cmd so I can read it. The brief also stipulates I cannot run the code in IDLE, so no cheating it that way. Must be Windows cmd.</p>