q = app_lulu.questions.keys()[0] #python indexes at 0
a1, a2, a3 = app_lulu.questions.values()[0] #this will return the answers corresponding to q
should be replaced by:
q = list(app_lulu.questions.keys())[0] #python indexes at 0
a1, a2, a3 = list(app_lulu.questions.values())[0] #this will return the answers corresponding to q
There is an error in the file:
https://github.com/bev-a-tron/MyFlaskTutorial/blob/master/7_finale.rst
q = app_lulu.questions.keys()[0] #python indexes at 0 a1, a2, a3 = app_lulu.questions.values()[0] #this will return the answers corresponding to q
should be replaced by:
q = list(app_lulu.questions.keys())[0] #python indexes at 0 a1, a2, a3 = list(app_lulu.questions.values())[0] #this will return the answers corresponding to q
otherwise python3 generates an error