Infinite loops exercise 7/13

I have replaced my original code with the solution code (exact same) where we are asked to combine students in two periods into one. But I am getting the output as just the students in one period. I am not sure if I am understanding the question wrong or if the coding is wrong.
Exercise

This is the code:
for student in students_period_A:
students_period_B.append(student)
print(student)

and the output is
Alex
Briana
Cheri
Daniele

which is the list of students in period A.

I’m confused

Hi! Welcome here :smiley:

There is nothing wrong with the coding, no worries there! You are looping over all the students in period A, add them to period B and then print that exact student.

Try adding the following outside of the loop.

print(students_period_B)
1 Like

Thank you so much! Mind-blowing how I was missing that part