logo CodeStepByStep logo

fill_data_list

Language/Type: Python lists list mystery

Fill in the list with the values that would be stored after the code executes:

data = [0] * 8
data[0] = 3
data[7] = -18
data[4] = 5
data[1] = data[0]
x = data[4]
data[4] = 6
data[x] = data[0] * data[1]
data[0]
data[1]
data[2]
data[3]
data[4]
data[5]
data[6]
data[7]

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.