When you use a for-loop the variable is ‘defined’ as soon as the loop starts. And because it belongs to the scope of the loop, you cannot access it before the loop has started or after the loop has finished. I hope the linked aticle is not too technical, but it should give you a general idea of scopes.
@mengoli.stefano1994 The variable you define as iteration variable that is not any default variable in python, so there is no dictionary or list of that sort, you can give the name as you wish and according to your content(if you want to make your code more readable and understandable), it can be a, b, c, d, i, app, mengoli, bla , bla, bla etc. It’s completely up to you. And you can access the variable just inside the loop, for which the variable is created. The variable can’t be accessed outside the loop.
See, I’ve used “row” instead of “app”, It worked perfectly.
Similarly you can use :