37
Surprisingly, no. In Python, strings are immutable (unchangeable). If you want to change "Lagos" to "Magos", you have to create a brand new string.
It sounds annoying, but it actually helps keep the computer's memory safe and fast. You’ll learn tricks to 'rebuild' strings later on.
Log in to add a comment.