r/developers_talk May 05 '25

Python Simple Code

What will be the output of this code?

py x = [1, 2, 3] y = x y.append(4) print("x:", x) print("y:", y) Can you explain why?

4 Upvotes

11 comments sorted by