Selectively replace multiple instances of a character within a string: Difference between revisions
Content added Content deleted
(→Python: Added a further variant ( a map-accumulation )) |
m (→Python) |
||
Line 518: | Line 518: | ||
Or, as a map-accumulation: |
Or, as a map-accumulation: |
||
<lang python> |
<lang python>'''Instance-specific character replacement rules''' |
||
from functools import reduce |
|||