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

authentication - Mongodb revoke acccess to connect test database -

c - getting error: cannot take the address of an rvalue of type 'int' -

How to merge four videos on one screen with ffmpeg -