Selectively replace multiple instances of a character within a string: Difference between revisions
Selectively replace multiple instances of a character within a string (view source)
Revision as of 16:12, 28 July 2022
, 1 year ago→Python
(→Python: Added a further variant ( a map-accumulation )) |
m (→Python) |
||
Line 518:
Or, as a map-accumulation:
<lang python>
from functools import reduce
|