4 ms·
Either you do it correctly (as in list manipulation, in place) or do it pythonically. That code is somewhere in between. The pythonic version would be s.replac
by zepolen 16y ago
Either you do it correctly (as in list manipulation, in place) or do it pythonically. That code is somewhere in between.
The pythonic version would be s.replace(c, '')