I want to tailor-make a thousand delimiter in Python. I am generating HTML and want to use  
as thousand separator. (It would look like: 1 000 000)
So far I have found the following way to add a ,
as a separator:
>>> '{0:,}'.format(1000000)
'1,000,000'
But I don't see to be able to use a similar construction to get another delimiter. '{0:|}'.format(1000000)
for example does not work. Is there an easy way to use anything (i.e.,  
) as a thousand separator?