class fruit(flaskform):
fruit1 = "apple"
fruit2 = "orange"
fruit3 = "grapes"
I am trying to access the variables in a for loop in my html page.
{% for index in range(3) %}
{{"fruit" + index}}
{%endfor%}
Is this possible? I would like to avoid writing 100 lines of code to access the variables if I have 100 fruits. I am new to flask and html. My question could be unclear and feel free to ask me if more info is needed.
listof fruit names instead.