PRACTICE / UNDERSTAND / REPEAT
Python practice question
Practice strings with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
Does str.replace mutate the original string?
Answer & explanation
Answer: No; it returns a string result
Python strings are immutable. Bind the returned value when you need the modified text.