logo CodeStepByStep logo

loop_tracing3

Language/Type: Python lists list mystery

What are the values of the elements in the list numbers after the following code is executed?

numbers = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
for i in range(1, 10): 
    numbers[i] = numbers[i - 1]
elements

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.