LEARN PYTHON: LOOPS Infinite Loops


#1

Hi all,

I have got a question 1 and 2 about this exercise:

https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-python-loops/lessons/learn-python-loops/exercises/infinite-loops
When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

I wanted to redo some exercises since working with loops is still a bit hard for me. Unfortunately I am unable to see the solution to this exercise since I already did it. Right now I wrote this in sript.py:

for student in students_period_A:
students_period_A.append(student)
print(student)

I am certainly missing something, since my output is only the list in students_period_A.

Can anyone help me out?

Thank you in advance


#2

after resetting the lesson, if you submit faulty code a couple of times the get solution button should show

your code is correct, you are printing student which are the original values from students_period_A list

after the loop, feel free to print whatever you want to see


#3

You are right, didn’t see it ealier. Thank you.