Strings are immutable in Python, so you have to create a new string.
newstr = oldstr.replace("M", "")
If you want to delete the middle character that you will do as follows:
midlen = len(oldstr)/2
newstr = oldstr[:midlen] + oldstr[midlen+1:]
To know more about this you can have a look at the following video tutorial:-