News for hackers. Stuff that matters.
Re:Python strings are immutable, but only sometimes by Scene_Cast2 on Monday February 15, 2021 @09:35PM (#26150291)
If you run that in a script, then you get True for all statements. Reason: when running a file, the interpreter reads the entire script and can make the optimization that both variables are the same objects, since they're not mutated.

There are no comments on this comment yet.