def sep(s):
s = str(s)
p=s.find('.')
if p==-1: p=len(s)
for i in xrange(p-3,s[0] in ('+','-'),-3):
s=s[:i]+','+s[i:]
return s
def sep(s):
s = str(s)
p=s.find('.')
if p==-1: p=len(s)
for i in xrange(p-3,s[0] in ('+','-'),-3):
s=s[:i]+','+s[i:]
return s