Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Composition of Functions solution in Creative category for Currency Style by flpo
from re import sub
from functools import partial, reduce
from operator import methodcaller
compose = lambda *funcs: lambda x: reduce(lambda x, f: f(x), reversed(funcs), x)
checkio = partial(sub, '\$[^ ]*\d', compose(
partial(sub, '\.(\d\d\d)', ',\g<1>'),
partial(sub, ',(\d\d)$', '.\g<1>'),
methodcaller('group', 0)
))
July 11, 2017