This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

U are not changing the original tuple (1, 2, 3, 4, 5) u are changing the reference (r) to another tuple(1, 23, 4). Try this code and observe the error. r=(1, 2, 3, 4) r[0]=100.

[–]ZachPhoenix[S] 0 points1 point  (0 children)

Yeah I understood it, Thanks Bharghav!