python - format decimal by specifying a particular format -


is there way format number in python below:

decimalformat("00000.00000").format(getsettlmentprice()).replace(".", "") 

this how done in java.

print "%11.5f" % settlementprice 

the format total width (including decimal point), number of decimal places keep. see format


Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -