title: How to accept input without the need to press enter Python 3
body: <p>i'm wondering how to accept input without the need to press enter. i searched online, and i get something regarding raw_input, but i think that became obsolete after the arrival of python 3.0.
  sometimes, i run a while loop on a whole program since i want to ask the user:
  continue? (y/n): </p>
  
  <p>for instance consider the code:</p>
  
  <pre><code>import random
  
  d = input('Toss coin? (y/n): ')
  
  while d != 'n' and d!= 'N':
      c = random.randint(1,2)
      if c == 1:
          print('HEADS!')
      else:
          print('TAILS!')
  
      d = input('Toss coin? (y/n): ')
  </code></pre>
  
  <p>but i just want to add more flare to my program by just not having the user press enter everytime. just press y or n and the program loops or breaks accordingly.</p>
  
  <p>ok so this is the new code:</p>
  
  <pre><code>import random
  import msvcrt
  
  d = input('Toss coin? (y/n): ')
  
  while d != 'n' and d!= 'N':
      c = random.randint(1,2)
      if c == 1:
          print('HEADS!')
      else:
          print('TAILS!')
  
      print('Toss coin? (y/n): ')
      d = msvcrt.getwch()
  </code></pre>
  
  <p>but msvcrt still doesn't work</p>