Answer:
x = 1234567.5
print(f'{x:,}')
* there's various ways to accomplish this, but above seems to be the shortest. Requires python ≥ 3.6
7.9m questions
10.6m answers