Question
Why does `text[0] = ‘D’` fail when `text` is a Python string?
Select an option. Your answer will be checked instantly.
Correct Answer: B. Strings are immutable
Explanation:
Immutability means an existing string object cannot be changed character by character. A new string must be created instead of modifying the original one in place.
Leave a Reply