Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
camel_Snake
on March 10, 2022
|
parent
|
context
|
favorite
| on:
Python built-ins worth learning (2019)
fwiw `format(x, ',')` will do this too and looks a bit more readable imo
oneoff786
on March 10, 2022
[–]
I think that holds true for just x, but not for, say,
f”Total Cost: {round(x / 1000000, 1):,}M”
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: