Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
re.split solution in Clear category for Currency Style by obone
import re
US_AMOUNT = r'(\$\d{1,3}(?:\.\d{3})*(?:,\d{2})*(?!(?:\d)|(?:,\d)|(?:\.\d)))'
checkio = lambda text: ''.join(
s.translate({ord('.') : ',', ord(',') : '.'}) if n % 2 else s
for n, s in enumerate(re.split(US_AMOUNT, text)) )
Sept. 12, 2019