Which statement about Python string immutability is correct?
- A Strings cannot be modified in place; operations return new strings
- B Strings can be modified by index assignment
- C Strings are mutable in Python 3
- D Only f-strings are immutable
Answer
Strings cannot be modified in place; operations return new strings
Building a string by repeated concatenation in a loop is therefore O(n squared). Use str.join() on a list instead.





