>>> x = 1_000_000 >>> print(f"{x:_}") 1_000_000
>>> x = 1_000_000 >>> print(format(x, '_d')) 1_000_000