title: How to save Int to a text file
body: <p>Im trying to save the int named "curmov" to a text file so it can be accessed again at a later date. I keep on getting a TypeError: must be str, not int. I need it to stay an int.any thoughts</p>
  
  <pre><code>curmov = 21
  def savemov():
      global curmov
      text_file = open("curmov.txt", "w+")
      text_file.write(curmov)
      text_file.close()    
  </code></pre>