A program joins lists with + and with +=, and then changes one of them through another list.
a = [1, 2]
b = a + [3]
a += [4]
c = [a, b]
c[0].extend([5])
print(a, b, len(c), len(c[0]))
What does the program print?
Log in to join the discussion.
Loading…