Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Currency Style by kurosawa4434
from re import search, sub
def checkio(text):
def rep_func(match_obj):
money = match_obj.group(0)
if not search('\.[0-9]{3}', money) and not search(',[0-9]{2}$', money):
return money
return money.translate(str.maketrans(".,", ",."))
return sub('\$[^ ]+[0-9]', rep_func, text)
July 21, 2016
Comments: