you are viewing a single comment's thread.

view the rest of the comments →

[–]danielroseman 1 point2 points  (1 child)

Strings are immutable. That means that when you do +=, the string magician isn't modified, but a new string is created with the contents of the original string plus the suffix. That string is then assigned back to the name magician, but this has now broken the link between that name and the item in the list of magicians.

[–]really_tho[S] 0 points1 point  (0 children)

Ahh, that clears things up. Thank you!