title: Is there a python 3 command to clear the output console?
body: <p>So I am trying to make a simple Conway's game of life in PyCharm, and I can only get a a bunch outputs and not a video like stream in the output console. Is there a command that will let me clear the output every loop in the program. I have already tried the "sys" commands, and the ANSI escape keys (I hope I spelled that right). Nothing seems to be working! I am using Python 3.</p>
  
  <p>I would like to clear the console on the first print statement in the while loop. If that helps.</p>
  
  <pre><code>import copy
  import random
  import time
  WIDTH = 60
  HEIGHT = 10
  
  
  nextCells = []
  for x in range(WIDTH):
      column = []
      for y in range(HEIGHT):
          if random.randint(0, 1) == 0:
              column.append('#')
          else:
              column.append(' ')
      nextCells.append(column)
  
  while True:
      # print('\n\n\n\n')
      currentCells = copy.deepcopy(nextCells)
  
      for y in range(HEIGHT):
          for x in range(WIDTH):
              print(currentCells[x][y], end='')
          print()
  </code></pre>