Source Code:
(back to article)
x = 123.456789 print("The number is {:.2f}".format(x)) print("The number is {:,}".format(x)) print("The number is {:+}".format(x))
Result:
Report an issue