title: how to use parameter from another function in flask
body: <p>I am new to the flask. I have a problem. I want to use a <em><strong>symptoms</strong></em> parameter from <strong>select_symptoms</strong> function to  <strong>get_match</strong> function. thank you :)</p>
  <p>this my code</p>
  <pre><code>@app.route('/organ/id/symptoms/&lt;int:symptoms&gt;', methods=[&quot;GET&quot;])
  def select_sysmptoms(symptoms):
      cur = mysql.connect().cursor()
      cur.execute('select symptoms, id, from symptoms where id in (' + str(symptoms) + ')')
      symptoms = [dict((cur.description[i][0], value)
                for i, value in enumerate(row)) for row in cur.fetchall()]
      return jsonify({'The Symptoms': symptoms})
  
  #Diagnosis the symptoms
  @app.route('/organ/id/symptoms/diagnosis/')
  def get_match():
      #how to use the symptoms parameter in select_symptoms function ?/
      new_symptoms = request.parameter_storage_class(symptoms)
      return jsonify(new_symptoms)
  </code></pre>