How do I modify a single character in a string, in Python?

Viewed 16540

How do I modify a single character in a string, in Python? Something like:

 a = "hello"
 a[2] = "m"

'str' object does not support item assignment.

4 Answers
Related