title: Python/Flask Redefining and Initializing Variables
body: <p>I have a pretty basic question here, I'm sure, but it's giving me a big headache. I have a flask/python program that, essentially, after a form is submitted, a value of a variable changes and the page refreshes, now including text that shows that variable.</p>
  
  <p>Here is some example code to iterate my idea:</p>
  
  <pre><code>@app.route("/", methods=["GET", "POST"])
  def index():
      if request.method == "POST":
          if counter == 'one':
              #stuff happens here
              counter == 'two'
          else:
              if counter == 'two':
                  #stuff happens
                  counter == 'three'
      else:
          counter == 'one'
  return render_template("index.html",counter=counter)
  ...
  </code></pre>
  
  <p>Any help? I'm a novice here, so I'm probably just doing something dumb.</p>