Easy task:
number = 100123.44
number_formated = "100,123"
Don't tell me there is no better way than:
number_formated = "{:,}".format(int(format("{:.0f}".format(number))))
?
To get the number with ,
as a thousands separator as a whole number, use this format string:
number_formated = "{:,.0f}".format(number)
No need to nest two calls and cast the resulting string to int again.