I'm not sure if this works as I don't get your error on my phone, so I'm sorry if it doesn't work.

Try this:

Code:

#Store the number as a string
n="12345678910.9028345"
#Find the index of the ".", or ","
i=n.index(".")
#Put each group of 3 digits of the integer part in a list
g=[]
a=i
while(a>0):
g.append(n[a-3:a])
if(i-3<0):g.append(n[0:i])
i-=3
#Delete an empty group (don't know why it occurs)
del g[len(g)-2]
#Add the groups to a new string, each followed by "," (or ".", if you want)
j=len(g)-1
n2=""
while(j>=0):
n2+=g[j]+","
j-=1
n2=n2[0:len(n2)-1]
#Add the remaining fractional part
n2+=n[i:len(n)]
#For this example, this should return 12,345,678,910.424548693

Hope this helps