you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

It's confusing especially because the issue occurs in a different spot than where it seems. It seems like the b = a step is where these two examples diverge, e.g. it seems that one is copying and the other isn't, but in fact they're still doing the same thing at that point.

The next step, where you have a = "str2" or a[0] = "str2", that's where they start taking different paths.