title: How to clear screen and revert to menu? Python 3.0
body: <p>I'm new to Python 3 and I'm stuck at following.</p>
  
  <p>I'm creating a Hangman Game for a School project and can't seem to clear the screen and revert back to the menu</p>
  
  <p>Here is my code as shown below</p>
  
  <pre><code>import random
  import os
  
  WORDS = ["handkerchief", "accommodate", "indict", "impetuous"]
  MAX_GUESSES = 7
  
  print("^^^^^^^^^^THIS IS HANGMAN^^^^^^^^^^")
  
  while True:
  
      input('Press &lt;ENTER&gt; to start a new game or &lt;CTRL&gt;+&lt;C&gt; to quit.')
  
      word = random.choice(WORDS)
      guess = ['_'] * len(word)
      guesses = set()
      n = MAX_GUESSES
  
      while True:
  
          print('\nYour word:', ' '.join(guess))
          print('You have {} chances left.'.format(n))
  
          if '_' not in guess:
              print('Congratulations, you win!\n')
              break
  
          if n &lt; 1:
              print('Sorry, no guesses left. You lose!\n')
              break
  
          character = input('Guess a new character: ')
  
          if len(character) != 1:
              print('You must enter exactly one character!')
  
  
          if character in guesses:
              print('You have already guessed that character!')
  
  
          guesses.add(character)
  
          if character not in word:
              n -= 1
  
  
          for i, c in enumerate(word):
              if c == character:
                  guess[i] = character
  
          os.system('clear')
          main()
  </code></pre>