how to print number with commas as thousands separators in python "%" code example Example: thousands separator python >>> num = 10000000 >>> print(f"{num:,}") 10,000,000