FAQ: Learn Python: Loops - Infinite Loops

This works perfectly.

for student in students_period_A:
    student =  students_period_A + students_period_B
print(student) # Don't indent here