Immutable vs Mutable types
What? Floats are immutable? But can’t I do x = 5.0 x += 7.0 print x # 12.0 Doesn’t that “mut” x? Well you agree strings are immutable right? But you can do the same thing. s=”foo” s += ‘bar’ print s # foobar The value of the variable changes, but it changes by changing … Read more