title: How to pass a python variable to html in flask without rendering template
body: <p>So, I have been trying to make a very basic flask website, just for the sake of learning flask, and I ran into a problem. When trying to pass a variable to HTML code from python, I am aware you could just do this:</p>
  
  <pre><code>from flask import Flask,request,render_template,redirect,url_for
  app=Flask(__name__)
  @app.route("/",methods=["POST","GET","DELETE"])
  def home():
      x="a variable"
      return render_template("index.html",htmlvar=x)
  </code></pre>
  
  <p>But, my issue is that my variable comes from a text input from the HTML, so I can't get it without rendering the HTML template, which is why I need to know a way to pass a variable after rendering the template. Any help would be greatly appreciated.</p>