Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 232 Bytes

File metadata and controls

10 lines (7 loc) · 232 Bytes

Limit Floating Point To Two Decimal Places

We can limit floating points to two decimals in Python as -

>>> "{:.2f}".format(3.145678912345)
'3.15'

Source: StackOverFlow