There is a string, for example. EXAMPLE.
EXAMPLE
How can I remove the middle character, i.e., M from it? I don\'t need the code. I want to know:
M
You can simply use list comprehension.
Assume that you have the string: my name is and you want to remove character m. use the following code:
my name is
m
"".join([x for x in "my name is" if x is not 'm'])