programming-examples/python/String/Python program to display a number with a comma separator.py

7 lines
247 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
x = 3000000
y = 30000000
print("\nOriginal Number: ", x)
print("Formatted Number with comma separator: "+"{:,}".format(x));
print("Original Number: ", y)
print("Formatted Number with comma separator: "+"{:,}".format(y));
print()