Re: Formatting a str as a number - Okay, one more related thing...

2024-09-01 Thread dn via Python-list
On 1/09/24 06:55, MRAB via Python-list wrote: On 2024-08-31 06:31, Gilmeh Serda via Python-list wrote: On Fri, 30 Aug 2024 05:22:17 GMT, Gilmeh Serda wrote: f"{int(number):>20,}" I can find "," (comma) and I can find "_" (underscore) but how about " " (space)? Or any other character, for th

Re: Formatting a str as a number - Okay, one more related thing...

2024-08-31 Thread MRAB via Python-list
On 2024-08-31 06:31, Gilmeh Serda via Python-list wrote: On Fri, 30 Aug 2024 05:22:17 GMT, Gilmeh Serda wrote: f"{int(number):>20,}" I can find "," (comma) and I can find "_" (underscore) but how about " " (space)? Or any other character, for that matter? Any ideas? Of course I can do f"{1

Re: Formatting a str as a number

2024-08-27 Thread Grant Edwards via Python-list
On 2024-08-27, Gilmeh Serda via Python-list wrote: > On 25 Aug 2024 15:46:25 GMT, Stefan Ram wrote: > >> f"{int(number):>20,}" > > Great. Thanks. Do you have a link to where that's documented? > > I did web search, found nothing. https://docs.python.org/3/library/string.html#formatspec https://do