title: Print and update a matrix in-place
body: <p>I have a matrix represented as a list of lists (but can easily change this representation if it would help). I will be updating this matrix as the program runs. I would like to have the matrix displayed on the screen in some standard way. So something like</p>
  
  <p><img src="https://i.stack.imgur.com/uMHEu.png" alt="enter image description here"></p>
  
  <p>I would like this display to update as the program runs.  </p>
  
  <p>For example,</p>
  
  <pre><code>def updatematrix():
  #Change some entries in the matrix
  
  A = [[3,2,3],[1,2,1],[2,8,6]]
  while(True):
      updatematrix()
      display(A) #This would ideally change the display in place.
  </code></pre>
  
  <p>What is a good way of doing this? (In fact I will be changing entire columns and rows and will eventually want to make the changed row/column be in a different color.)</p>
  
  <p>I am happy to use any free libraries that might be useful.</p>