How can I find the data which written with for loop in Flask

Solution
{% for i in range(len(data)) %}

    






{% endfor %}
@app.route('/mainpage', methods=['POST','GET'])
def mainpage():
    cursor.execute("SELECT * FROM product")
    fetchdata = cursor.fetchall()
    if request.method == 'POST':
        if request.form['submit_button'] == 'Add':
            number = request.form.get("number1")
            print(number1)
            return render_template('main.html', data=fetchdata)
    else:
        return render_template('main.html', data = fetchdata)