Lists inside a list made by multiplying
Predict the output · Challenge · §3.2, §3.5, §3.7 [Pair coding with AI] Asking for list code
You wanted to fill three days of [likes, comments] records with 0, so you got a short piece of code from an AI. Then you changed only the first day's comment count to 1. Predict the two lines of output without running the code.
Code
days = [[0, 0]] * 3
days[0][1] = 1
print(days)
print(days[2][1])Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.