printing number with 2 decimal places code example Example: to print with x decimal places print('%.xf'%s)