I'm following the official tutorial on Django and i came across this lines
def index(request):
latest_question_list = Question.objects.order_by('-pub_date')[:5]
output = ', '.join([q.question_text for q in latest_question_list])
return HttpResponse(output)
It's everything clear except for the for in loop and i can't find anywhere where to understand how it is written.
Why q.question_text is BEFORE the for in loop?
I already looked at the other question questioning this line of code, but i cannot fine anywhere some python documentation that explain me how the syntax of this loop works, even though i can understand what it does.
Also i'm new to python and i am clearly miss something...