0
child= [[]] * 10
child[0].append(3)

I expected the output to be

child
[[3], [], [], [], [], [], [], [], [], []]

where output came out to be

child
[[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]]
Zero Piraeus
  • 52,181
  • 26
  • 146
  • 158
dev2qa
  • 26
  • 4

0 Answers0