logo CodeStepByStep logo

numbers_list

Language/Type: Python lists list mystery

What elements does the list numbers contain after the following code is executed? (Write the elements in the format: [0, 1, 2, ...] )

numbers = [0] * 8
numbers[1] = 4
numbers[4] = 99
numbers[7] = 2
x = numbers[1]
numbers[x] = 44
numbers[numbers[7]] = 11    # uses numbers[7] as index
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.