Do certain data types need assignment to change, and others don't?
Yes.
Why?
Because that is part of the API provided by each type.
Some types of objects (like lists) provide ways of mutating their data (like list.reverse
). Others don't. That's just part of what you need to know about a type in order to use it effectively. In Python parlance, types that allow such mutation are called "mutable" and ones that don't are "immutable".
(Technically, in your example above, you never "change" the string. Rather, you create a new string and assign it to the variable that used to point at the old string. This is different from important ways from your list example, where the actual list object is altered. You can find lots of information about the differences by searching for discussions of mutable vs. immutable objects.)