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
Use the translate() method:
>>> s = 'EXAMPLE' >>> s.translate(None, 'M') 'EXAPLE'