1>>> x = 13.949999999999999999
2>>> x
313.95
4>>> g = float("{:.2f}".format(x))
5>>> g
613.95
7>>> x == g
8True
9>>> h = round(x, 2)
10>>> h
1113.95
12>>> x == h
13True
1#!/usr/bin/env python3
2
3val = 12.3
4
5print(f'{val:.2f}')
6print(f'{val:.5f}')
7