add_commas
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
add_commas [2021/01/13 20:48] – [input is a single number; without pandas] raju | add_commas [2021/01/13 20:57] (current) – [input is a single number; without pandas] raju | ||
---|---|---|---|
Line 3: | Line 3: | ||
search tags | f strings, thousands separator, format integers with commas | search tags | f strings, thousands separator, format integers with commas | ||
==== input is a single number; without pandas ==== | ==== input is a single number; without pandas ==== | ||
+ | | ' | ||
+ | | f' | ||
+ | |||
< | < | ||
In [1]: | In [1]: | ||
Line 20: | Line 23: | ||
Out[3]: | Out[3]: | ||
' | ' | ||
+ | </ | ||
+ | |||
+ | Examples using a print statement | ||
+ | < | ||
+ | In [1]: | ||
+ | a = 123456 | ||
+ | |||
+ | In [2]: | ||
+ | print(' | ||
+ | The magic number is = 123,456 | ||
+ | |||
+ | In [3]: | ||
+ | print(' | ||
+ | The magic number is = 123,456 | ||
+ | |||
+ | In [4]: | ||
+ | print(' | ||
+ | The magic number is = 123456 | ||
</ | </ | ||
add_commas.1610570895.txt.gz · Last modified: 2021/01/13 20:48 by raju