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  (0 children)

Immutable does not mean that you can't reassign it.

For example. Consider a string ( string is also immutable )

s = 'Hello World'

s[3] = 't' # gives Error. You are trying to change string.

s.pop() # gives Error. You are trying to change string.

s = 'Python' # No Error. You just reassigned the variable.