format python number with commas code example
Example 1: format python number with commas
num = int(input())
print(f"{num:,}")
#Hope this helps:)
Example 2: thousands separator python
>>> num = 10000000
>>> print(f"{num:,}")
10,000,000
num = int(input())
print(f"{num:,}")
#Hope this helps:)
>>> num = 10000000
>>> print(f"{num:,}")
10,000,000