Selectively replace multiple instances of a character within a string: Difference between revisions

m
(→‎Python: Added a further variant ( a map-accumulation ))
Line 518:
 
Or, as a map-accumulation:
<lang python>from'''Instance-specific functoolscharacter importreplacement reducerules'''
 
from functools import reduce
 
 
9,655

edits