Sobes.tech
Intern — Senior

Features of list assignment in Python

livecode

Task condition

Explain how list assignment works in Python and why the output appears in a certain way after such an operation.

foo = [1, 2, 3, 4]
bar = foo
bar.append(5)
print(foo)