title: while and time.sleep() not working well together in python
body: <p>I am building an RPG and this is the important part if the code id like helped being debugged</p>
  
  <pre><code>page="village"
  
  while(page=="village"):
  os.system('cls') #this will only work on windows use os.system(‘cls’)   for macs use os.system('clear')
  pstats()
  print("")
  print("")
  print("")
  print("")
  print("")
  print("")
  print("")
  print("")
  print("")
  print("")
  time.sleep(1)
  </code></pre>
  
  <p>Let me explain exactly how some of the code is working.  I am using the the page variable to track what page they are on (i am using ANSII graphics).  I am just testing out it but the os.system('cls') seems to be the problem.  I have looked up questions and other things about using this for windows but its not working.  Also it is not a problem with psats() that just print out their level and amount of money to the screen easily.  it does not through an error either, it just keep writing pstats without clearing the screen.  Does anyone have an idea of how i could fix my code to work properly?</p>