how print 2 decimal in python

Solutions on MaxInterview for how print 2 decimal in python by the best coders in the world

showing results for - "how print 2 decimal in python"
Stefania
14 Oct 2017
1# round a value to 2 decimal points
2value_to_print = 123.456
3print(f'value is {round(value_to_print, 2)}')
4# prints: value is 123.46
Jayne
03 Oct 2019
1print("{0:.2f}".format(sum(query_marks)/len(query_marks)))
Nicolò
05 Sep 2018
1# this will print up to digits after decimal
2print("%.2f" % (70/105))
Stefania
05 Jan 2021
1for i in range(10):
2    j=i*0.1
3    print('%0.2f' %j)
queries leading to this page
how to print 2 decimal point in pythonlimit int to 4 decimals pythonhow to make the float function print only two decimal places in pythonpython take 2 decimalhow to print number with 2 decimals pythonprint n number of decimal places pythonhow to show only 2 decimal places in python print fhow to make a number number show 2 decimal places in pythonpython print only two decimalshow to get two decimal places in python intpython print to given decimal placeshow to 2a two decimal in pythonhow to print only 2 values after decimal in pythonprint numbers after decimal point pythonpython printing decimal placespython always show 2 decimalshow to print 2 decimal in pythonprint a digit with 6 decimal points in pythonpython print floatshow to print value upto 2 decimal in pythonhow to print the first 2 decimal places in pythonprinting floating point numbers in python upto 10 decimal placespython print decimal 2how to print up to 1 decimal point in python5 decimal places pythonprint decimal value in pythonprint upto 2 decimal places pythonround float python two decimalsformated number python decimal placesstring format python two decimal placeshow to print double with 2 decimal in pythonhow to put numbers to two decimal places pythonprotong float value upto 4 decimaal oplaces in puythonoutput with 2 decimal places pythonfloat decimal places pythonhow to print numbers in 2 dp pythonprint up to 2 decimal places pythonhow to get output in 2 decimal places pythonprint precision upto 2 decimal places pythonhow to print decimal value in pythonhow to print 2 decimal value in python how to display number with one decimal point in pythonprint 2 decimal in pythonprint 28 29 python 2 decimal placespython print float 2 decimal placeshow to print number upto n decimal in pythonhow to print 2 places after the decimal in python 3how to print decimal value till two places in pythonhow to print up to 4 decimal places in python usinf fprint 2 decimal placespython get decimal placesmake decimal till 2 places pythonpython variable 2 decimal placesprint in decimal pythonhow to print float with 2 decimals pythonhow to print 1 decimal in pythonhow to print 2 decimal values in pythonhow to print values after decimal in pythonhow to print two decimal places in pythonpython print only 2 decimalshow to get result upto 2 decimal places in pythonpython print with 2 decimalsfloat two decimal places pythonpython print number to 2 decimal placesprint upto 2 decimal places in pythonget 2 decimal of float pythonpython print n decimalspython show decimal with printpython print to decimal placespython print number till 3 decimal placeshow to print up to 3 decimal places in pythonformat a float to 2 decimal places pythonpython print 2 decimal places f stringhow to specify decimal places in pythonhow to have 2 decimal places in pythonprint only 2 decimals pythonhow to use to 3 decimal places pythonhow to make two digit after decimal in pythonhow to make python so it print out 2 decimal placeshow to print float value up to 2 decimal places in pythonhow to print only 2 decimal in pythonprint number with decimal point pythonpython print number with one decimalpython print x decimal placeshow to do 2 decimal places in pythonhow to get a letter to print after decimal placesdisplay up to 2 decimal in pythonpython round to 2 decimals 5chow to keep two decimal places in pythondecimal two digits pythonhow to print only certain numbers after decimal in pythonlimit decimal places when print pythonhow to print number with two decimal places in pythonpython math round up 2 decimalshow to get 2 digits after decimal point in pythonpython round to 2 numbershow to set the decimal places to two in pythonhow to show two value after decimal in pythonpython print without decimalpython float print 4 decimal placespython 2 numbers after decimal pointhow to print a decimal in pythonpython always 2 decimalspython print upto 2 decimal places even if 0python convert any number to decimal with 2 decimal placesprint only 2 decimal places in pythonhow to ensure python division gives 2 decimal placesshow only two decimal in pythonpython print number only 2 decimalspython print only 2 decimal placesprint up to 2 decimal in python3 decimal places pythonhow to print to one decimal place pythonprint 5 decimals after float in pythonpython show 3 decimal placesfloat 2 decimal places pythonpython print number two decimalsprint with two decimals pythonhow to print until 2 decimal places in pythonhow will i print a floating correct upto 2 decimals in pythonhow to print upto 2 decimal places in pythontake 10 decimal places in pythonprint python 3 decimalsprint 2 decimal places pythonpython print number with all decimal placeshow to return 2 decimal places in pythonpython f string two decimal placesformat to have 3 decimal places pythoncorrect to 2 decimal places pythonprint up to 6 decimal places pythonprint float values to 2 decimal places only pythoncheck for only 2 decimal places pythonprint number to 3 decimal places pythonhow to print a number with one decimal point in pythonprint float upto 2 digits pyhtondecimal places pythonpython print format 2 decimal placespython print 2 digits after decimal2 decimal print pythonpython show only two decimalsprinting decimal point in pythojnwhich python datatype has two decimal placeshow to print float value upto 2 decimal places in pythonpython display 2 decimal placespython float only 2 decimalsshow result upto 6 decimal places in pythonshow 2 decimal points pythonformat output to 2 decimal places pythonpython print price with two decimal placesformat decimal places in python 3python format to decimal placesget 2 decimal places in pythonhow to control decimal places in pythonf 7b 7d keep two places after the decimal point 2bpythonhow to print 2 numbers after in pythonhow to print up to two decimals in python as integerhow to get two decimal places in pythonformat float 2 decimal places pythonpython print upto two decimal placespython show 2 decimal places2 decimal places in pythonpython 2 digit after decimalin decimal get 2 decimal in pythonhow to print two places of decimal in pythonpython float decimal placesoutput to the two decimal places pythonprint variable with one decimal place pythonpython print float64 with two decimal placesdecimal with two decimal places in pythonpython format number with 2 decimal placeshow to print 2 two deciaml places from float in pythonhow to take value upto certain places in pythonpython float with 2 decimalshow to print decimal number in pythonprinting decimal places in pythonhow to print two decimal in pythonflaoting point with 2 decimal print in pythonhow to return in two decimal places pythonhow to print only 2 decimal places in pythonhow to print a float with two decimal places in pythonround to 2 decimal places pythonprint all decimals pythonprint up to 4 decimal places in c 2b 2bprinting float upto two decimal placeshow to take result only upto 2 decimal places in pythonhow to print convert to only two decimal places pythonformat number 2 decimal places pythonhow to print up to 6 decimal places in pythonpython divide to 2 decimal placeshow to correct upto 2 decimal places in pythonnumber of decimal places python python print to 3 decimal placesformat double to 2 decimal places pythonprint first 2 decimal places pythonprint decimals of any number in pythonprint 2 digits after decimal pythonpython round a float to 2 decimal placesget just a float with 2 decimals pythonmake to two decimal places pythonmake 2 decimal places pythonhow to print up to 5 decimal places in pythonhow to print numbers to the 2nd decimal in pythonprint valure upto 2 decimal in pythonpython print with 1 decimalshow result upto two decimal in pythonpy float 2 decimal3 places of decimal pythodprint float 2 decimal pythonprint with 2 decimals pythonpython print two decimal placesmake a float only have 2 decimals pythonpython print more decimalsthree decimal places pythonpython show last 2 decimal placespython print float up to 2 decimalhow to print 5 decimal in pythonprint float 2 decimal places pythonprint float to 1 decimal places pythonhow to print 2 decimal number usig pythonprint decimal numbers python python decimal places returnprint certain number of decimals pythonhow to print value with 1 decimal value in pythonto print digit after decimal in pythonhow to print with 2 decimal places in pythonhow to set display only 2 decimal places in pythonhow to display 2 decimal places in pythonprint decimals pythonprint format 2 decimals pythonshow all decimals pythonfloat up to 2 decimal places in pythonshow 2 decimal places of every value in list pythonprint 3 decimal places pythonpython float limit to 2 decimalshow to show 2 decimal places in pythontake first 2 decimal places pythonpython print float with 3 decimalsdecimal upto 2 places in pythonpython print n decimal placesprint two decimals pythonpython print format to 2 decimal placespython only 2 decimal placespython show only 2 decimalsprinting upto 2 decimal places in pythonfloat python 2 decimalsformat print python3 number of decimal placeshow to print out specific number after decimal places in pythondecimal 2 digit in pythonhow to print something 2 decimal places pythonspecify decimal places pythonpython show two decimal placeshow to print one decimal in pythonspecify number of decimal places pythonprint double 2 digits after decimal pythonprint float up to 3 decimal places pythonwhich function will you use to print decimal numbers in python 3freturn number to two decimal places pythonhow to print only 2 decimal places after in plythonupto 2 decimal places in pythonshow just two decimal in result pythonpython number format decimal placeshow to show one decimal place in pythonprint upto 6 decimal places pythonget 3 decimal places in pythonpython print list with 4 decimal placespython int to 2 decimal placesprint output in python to certain decimal places 3fpython print format 1 decimal placeprint 2 decimals pythonpython print one decimal placeprecision up to 2 decimal places in pythonhow to print a number with 5 decimal places in pythonhow to print floating numbers in python till 2 decimal placeshow to print values upto 2 decimal places in pythonpython float take only 2 decimals places how to print 2 points in pythononly print 2 decimal points pythonprint 1 decimal if number is decimal pythonhow to limit float to 2 decimal places pythonpython 2 decimal palcesreduce decimal in pythonpython float 2 decimal placehow to print to 3 decimal places in pythonprint value of float upto decimal placespython string format to 2 decimal placeshow to print the decimal of a number in pythonpython set print decimalprint point two decimal places pythonprint a decimal till 2 digits pythonpython print int to 2 decimal placespython return two decimal placespython float to 2 decimal placesfloat to 2 decimal places pythonget 2 digit after decimal pythonprint number with 6 decimal places pythonprint with decimals pythongive 2f in python once and print every float with 2 decimalspython print number after decimalprint float with 2 decimals pythonshow to 2 decimal places pythonhow to print up to 6 decimal in pythonprint number of decimals pythonfor all float python 2 decimal placesshorted to 2 decimal places pythonpython print number to n decimal placesprint an math operation with 2 decimals in pythonhow to get exactly 2 digits after decimal in pythonpython decimal 2 placespython print number with 2 decimalshow to convert float up to 2 decimal places in pythonpython format decimal to 2 placeshow to get 2 decimal point in pythonpython display two decimal placesprint upto one decimal place pythondisplay a float in python 2 decimal placesupto two decimal printprint till 14 decimal places pythonhow to get 2 decimal places variable in pythonpython format to 2 decimal placespython print array 2 decimal placespython set decimal placespython print with two decimalsprint to 3 decimal places pythonhow to correct to 2 decimal places in pythonhow to print a number upto two decimal places in pythonpython print decimal digitshow to only show two decimal places in pythonpython show 2 decimal pointshow to set display only 2 decimal places in python f string2 decimals pythonhow to print to 2 decimal places in pythonprint float pyhtonprinting 2 decimal places in pythonformat a float to two decimals pythonwhyd oes python print so many decimal placeshow to print upto two decimal in python 2 decimal places pythonpython how only 2 decimalhow to print float with 2 decimals in pythonprint float with 4 decimals pythonformat 3 decimal places pythonpython print only 4 decimalspython float 2 decimal placesprint only 6 decimals pythonlimit decimal places pythonpython string format float 2 decimal places and commapython print number with 1 decimal placeprint answer in 2 decimal places pythonprint float value in python to 2 decimal placesreturn 6 decimal in point pythonhow to print up to 2 decimal places in pythonprint decimal pythonpython float 2 decimalround float to 2 decimal places pythonpython print number with 2 decimal placeshow to print a integer number up to 4 decimal places in pythonhow to print answer 2 decimal places in pythonhow to print an integer to only two decimals in pythonpython show only 2 decimalhow to print up to 4 decimal places in pythonprinting decimal in pythonpython print number after decimal placesformat 5 decimal places pythonhow to print float with 3 decimals pythonset 2 decimal places in pythonhow to print python output upto 3 decimalpython string format round to 2 decimal placeslimit double to 2 decimal pythonpython float get 2 decimalsprint only two decimals pythonprint a variable upto 2 decimal places in pythonpython format two decimal placeshow to print more numbers behind decimals pythonhow to show two decimal places in pythonpython print 2 decimalspython 2 decimal places formathow to print single digit after decimal in pythonpython format string 2 decimal places2 places after decimal point pythonstore money value python 2 decimalscreate all decimals 2 places in python functionhow to make answer in python upto 2 decimal placeshow to get 2 decimal points in pythonformat to 3 decimal places pythonprint number with 2 decimals pythonpython make decimal multiple placeshow to print numbers with 2 decimal places in pythonhow to print till 2 decimal places in python2 digit after decimal point in pythonpython decimal places 2print upto two decimal places pythonhow to print result only upto two decimal places in pythonhow to limit a number to two decimal places pythonformat with 2 decimals pythonprint 4 decimal places pythonpython format decimal placesprint more than 2 decimal places in pythonhow to output 2 decimal places in pythononly upto some decimal points pytho nhow to get a letter to print with decimal placespython print 2 decimal placesoutput upto 2 decimal in pythonprint number of decimal spaceshow to print a certain number of decimal places in pythonprint 6 decimal places in pythonhow to print 6 place decimal value in pythonhow to print up to two decimals in pythonpython print n values after decimalpython display two decimal pointprint only till 2 decimal places in pythonpython 3 print number with 2 decimal placesprint to decimal places pythonpython return number 2 decimal placesround float to two decimals pythonshow only two digits after decimal in pythonhow to print two decimal place in pyton8 decimals print pythonhow to take 2 digit after decimal in pythonpython restric decimal number 2 decimal placesprint only 4 decimals pythonhow to print to 3 decimal places in python3python print value to 2 decimal placespython print decimal to 2 placeshow to print in python3 oly 4 decimalsupto two decimal places in pythonprint float value in python for 2 decimalsprint strings with two decimals in pythonhow to print only 3 decimal places in pythonprint upto two decimal in pythonhow to print 2 decimal places in python 3how to print multiple float in print in pythonhow to make a number 2 decimal pythonprint upto 4 decimal places in pythonget values upto particular decimal places in pythonprinting te float number upto 2 decimal places in pythonpython print to two decimal placespython 2 decimalschange the decimal in column into 2 decimal pythonfloat point upto 2 places in pythontwo digits after decimal point in python arrayhow to print upto two decimal places in pythonpython print decimalprint numbers to 8 decimal places in pythontwo decimal places pythonhow to print 2 decimal in float in pyhow to print a float number upto 2 decimal places in pythonhow to print number with 2 decimal places in pythonhow to display only two digits after decimal point in pythonhow to just print the first two decimal places in pythonpythonf ask print float to 2 decimal placeshow to return a float with 2 decimal places in pythonhow to print int with 2 decimal places in pythonpython print format decimal placestwo decimals printinh in pythonhow to print number to two decimal places in pythonpython display only 2 decimalsget up to 2 decimal places in pythonhow to print ans upto 2 decimal places in pythontake two decimals pytohnhow to get 6 decimal places in pythonget up to 2 decimal places in python f stringpython 3 decimal places pythonprint value with only 2 decimals pythonprint upto two decimal places in pythonprint till 2 decimal places pythondecimal round to 2 decimal places pythonpython decimals printset amount of decimal places pythoninteger value upto 2 digits in pythonpython program to print two float values upto 2 decimal placesprint up to two decimal pythonpython only show 2 decimalsonly 2 decimal places in pythonformat 2 decimal places pythondecimal places python printforce output to two decimal places pythonhow to print 2 digits after decimal in pythonhow to get decimal with 2 number in pythonset decimal places pythonhow to print a number upto 2 decimal places in pythonhow to get only 2 decimal places in pythonhow to short numbers to only 2 decimal places pythonpython two decimals2 decimal place pythonhow to print float value in python upto 2 decimal placesprint 2 digital decimal in pythonpython print with 2 decimalprinting one decimal place in pythonwhen dividing 2c output only two decimal places pythonpython 2 decimal placespython print 5 digits after decimalround the result to 2 decimal places in pythondecimal to 2 places pythonpython how to print only 2 decimalspython number of decimal placeshow to get float value in python upto 2 decimal placespython print float with 2 decimalshow to take float input upto 2 decimal points in pythonhow to round a float to 2 decimal places in pythonpython how to make 2 decimal numberprint ponly top 2 decimal places in pythonfloat upto 2 decimal in pythonprint upto 3 decimal places in pythonpython print string with 2 decimalshow to print two position after a decimal point in pythonhow to set up decimal places in python 3how to make python show two decimalspython keep only two decimal placesdisplay only two decimals pythontwo digits decimal pythonhow to print only till 2 decimals in pythonhow print 2 decimal in pythonhow to print a number with more than 2 decimals pythonprint only two 2 decimals in pythonpython float print 2 decimal placesshow in decimal in pythonprint number with 2 decimal places in pythonformat to two decimal places pythonprint float with 2 decimal python formathow to take float 2 digit value in pythonpython rpint 3 digits and one decimalpython number to 2 decimal placespython store 2 decimalkeep decimal places in pythonprint 3 digit after decimal in pythonprinting int in python with decimal placesprint decimal notation pythonhow to show 2 decimal places in python in print statementpython float to 2 decimalsprint number after decimal pythonprint to two decimal places pythonhow to display 2 decimal places in python in front of numberpython program to print float 2 decimal placeshow to 2 decimal places in pythonstring format 2 decimal places pythonhow to round float to 2 decimal places in pythonprint value upto 4 decimal places in pythonhow to print 2 digit after decimal in pythonhow to print float up to 2 decimal places in pythonprint upto only 2 decimal numbers in pythonset decimal places in pythonpython round to 2 decimalgetting results in 2 decimal point pythonprint 2 decimal points float pythonpython decimal placespython to 2 decimal placesprint decimal como int pythonpython only show 2 decimal pointsprint up to 4 decimal places in pythonhow to print float with 2 decimal in pythonhow to print only 2 digits after decimal in pythonup to 2 decimal places in pythonhow to keep multiple decimal places in pythonprint up to two decimal places pythonhow do you print 1 digits after a decimal in python 3fpython limit to two decimalshow to print up to two decimals in python as floatpython format to 3 decimal placesprint number upto 2 decimal places in pythonprint more decimal places pythonpython print limit decimal placespython how to print everything after decimal of a fkiatpython format decimal placesdisplay 3 decimal places pythonpython correct to 2 decimal placesceil to 2 decimal places in pythonpython print decimal placeshow to print a number to 2 decimal places in pythonpython round a number up to 2 decimalshow to print decimal of a numberin pythontake only 4 decimals in pythonfloat with two decimal places pythonprint float with 2 decimals python 3python print float to 2 decimal placesonly 2 decimal places pythonhow to print 0 0 to 2 decimal places in pythonget float value upto 2 decimal places pythondisplay only 2 decimals pyuthonhow to print different decimal values in python with formatensure precision of two decimal places pythondata type for number with two decimal points in pythonprint 6 digits after decimal pythonpython only two decimal placespython print upto 2 decimal placesprint up to 2 decimal places in pythonround to two decimal places python using decimalpython ceil 2 decimalsmake python print 2 decimalspython float number upto 3python how to store more decimal placesprint 2 digit decimal number in pythonpython 3 print float 3 decimal placesshow 2 decimal places in pythonget two decimal places in pythonprint 2 decimal point pythonround float value to 2 decimal points in pythonpython format decimal 2 digitshow to print 2 numbers after decimal in pythonprint to 2 dp pythondisplay float with 2 decimal places pythonhow to print integer up to 6 decimal places in pythonprint in python with two decimales and coamshow 2 decimal pythonpython count decimal placesprint decimal number in pythonpython format 2 decimal placespython print array decimal placeshow to format 2 decimal places in pythonpython have float with two decimalspython round to 2 decimal placeshow to print 2 pointspython return 4 decimal placesmake float print with 2 decimals python2 decimal in pythonhow to print up to two decimal places in pythonprinting float in python upto 2 decimalans upto 2 decimal places in pythonprint a number with x number of decimal places after pythonhow to print only upto two decimal in pythonformat to 2 decimal places pythonprint 1 decimal places pythonprint one decimal place pythonto print 4 digit after decimal in pythontwo decimal places in pythonhow do you format to 2 decimal places in python 3fpython take values in 2 decimalspython print string from 3 decimal placesformat in python 2 decimal places6 decimal places pythonhow to print 5 decimal places in pythonprint 5 decimals in pythonhow to print decimal values in pythonconvert number decimal to 2 places pythonhow to print the output with two decimal places in pythonhow to include 2 after decimal in pythonpython3 format float to 2 decimal placesfloat up to 2 decimal pythonpython get 2 digit floatpython print command round to 2 decimalsprint value with only 2 decimals poiunt pythonprint a number in python till 2 decimal placesprint float to 2 decimal places python 3have 2 decimal points python floatmore decimal places pythonhow to print in python oly 4 decimalsprint 2 decimal float pythonpython print float with 1 decimalhow to print number till two decimal places in pythonprint only first 2 decimal places in pythonhow to limit the decimal places in pythonhow to show two places after decimal in pythonhow to get only two decimal places in pythonpython string format 2 decimal placesprint variable to 2 decimal places pythonpython keep output to 2 decimal placesshow decimal places pythonpython print floatround python variable 2 decimalspython format print with width and 2 decimal placeshow to get upto six decimal places in pythonprint value upto two digit precision in python2 decimal places pythonprint up to 5 decimal places pythonoutput in 3 decimal point pythonewrite numbers in to two decimal place in pythonround 28 2c2 29 python how to format output in 2 decimal places in pythonformat to 4 decimal places pythontake only 2 decimals pythonshow 6 decimal pythonhow to print result upto 6 decimal places in pythonprint only 3 decimal places pythonhow to print only 2 decimals in pythonprint two digits after decimal pythonget more decimal places in python calculationstwo digits after decimal point in pythonprint float with two decimals pythonpython keep 2 decimalpython two decimal placesprint decimal upto 1 decimal in pythonpython print certain number of decimal placespython print 4 digits after decimalpython format number to 2 decimal placesprint output with 4 decimals pythonget float value in python uto 2 decimal placesprint python 2 decimal placespython how to return 6 decimal placesfloat with 2 decimal places pythonround 2 pythonprint python number with 2 decimal placesround to two decmial places pythonprint upto the decimal in python2 decimals python printhow to print 3 decimal places in pythonpython upto 2 decimal placespython auto print float with 2 decimalshow to display float value upto 2 decimal places in pythonto print digits after decimal in pythonformat text upto 2 decimal places in python stringhow to make number two decimal places in pythonprint float upto 2 decimal places pythonpython how to print to 2 decimal placeshow to print two values after decimal point in pythonhow to print answer 2 decimal places in python 3how to print up to 2 decimal in pythontwo decimal places in python fstringround to 2 digits after decimal pythonshow two decimal python3python print variable with one decimal placeget decimal values upto 2 digits pythonpython decimal printhow to print specific decimal values in pythontake 2 decimal places in pythonpython only show 2 decimal placespython float with 2 decimal placesprint two decimal places pythonhow to get answer upto 2 decimal places in pythonhow to get 2 digits after decimal place in pythonpython display only 2 decimal placeshow to print only decimal places in pythonprint decimal places in pythonprint python upto 30 decimal places in pythonprint upto two decimals pythonkeep float value upto 3 decimal places in pythonprint only two decimal places pythonpython how to return 2 decimal placespython fix decimal placesprint number till 2 decimal places pythonhow to print a number in decimal places in python2 digits after decimal point pythonpython print decimal 2 digitshow to print output upto 2 decimal places in pythonprint output to 2 decimal places pythondecimal value of two places pythonpython print list with 2 decimalsprint float to 2 decimal places pythonpython display number to 2 decimal placesprint decimal in pythonpython program to print 1 decimal to 2 decimalprint only upo 2 decimal places in pythonprinting up to 2 decimal places in pythonhow i have take 2 decimal digits in pythonpython print 3 decimal placesdisplay float value in python upto 2 decimal placesprint up to 2 decimals in pythonround to specific decimal pythonfloat display two digits decimal pythonfixed round to two decimal places python2 place of decimal in pythonwrite a number in two decimal places in pythonhow to display a number to exact two decimal places in pythonget only 2 decimal places pythonhow to print 2 decimal places in pythonprint all decimal value in pythonpython print two number with decimal formatpython 4 decimal placespython only 2 demicalspython print all decimals how to set decimal places in pythonhow to print in decimal in pythonget number of decimal places pythonhow to get 2 decimal places in pythonhow to print two decimals in pythonprint to 2 decimal places pythonhow to get 4 places after decimal in pythonformat python output to always have 2 decimalshow print 2 decimal in python