title: How to manage multiple similar app routes in flask application?
body: <p><b>Alt:</b> How to use a variable and loop it in Flask app route such that it handles multiple webpages which have similar permalinks (i'm not sure what that is though).<br><br>
  This is a snippet of a simple example to demostrate what I mean:</p>
  <pre><code>@app.route('/say-hii-1')
  def say_hii_1():
      return &quot;&quot;&quot;&lt;h1&gt;Hello 1!&lt;/h1&gt;&quot;&quot;&quot;
  
  @app.route('/say-hii-2')
  def say_hii_2():
      return &quot;&quot;&quot;&lt;h1&gt;Hello 2!&lt;/h1&gt;&quot;&quot;&quot;
  
  @app.route('/say-hii-3')
  def say_hii_3():
      return &quot;&quot;&quot;&lt;h1&gt;Hello 3!&lt;/h1&gt;&quot;&quot;&quot;
  </code></pre>
  <p>You see, only the number changes in all routes, and the return values also have a pattern. My project is much more complex and has 10-20 such routes.<br>Is there a way, in which I can reduce all of them to just one route?<br><br>
  Some information that you might need: <br>
  <b>OS: Ubuntu 19.10</b><br>
  <b>Python version: 3.7.5</b><br></p>