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
1.6m questions
2.0m answers