User Tools

Site Tools


add_commas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
add_commas [2021/01/13 20:53] – [input is a single number; without pandas] rajuadd_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 ====
-  * '{:,}'.format(value)  # For Python ≥2.7 +'{:,}'.format(value) For Python ≥2.7 | 
-  f'{value:,}'  # For Python ≥3.6+f'{value:,}' For Python ≥3.6 |
  
 <code> <code>
add_commas.1610571209.txt.gz · Last modified: 2021/01/13 20:53 by raju