title: New to python and programming in general, need help editing a variable in terms of itself
body: <p>When I put this in it brings up an error and I'd like some help finding out what I did wrong.</p>
  
  <pre><code>x = 0
  
  def func(var):  
      if var = True:  
          x = x - 1
      else:
          pass
  </code></pre>
  
  <p>The error comes from x = x - 1, and I can't figure out what I'm doing wrong.</p>