Beginner: Trying to get REAL NUMBERS from %d command

Irmen de Jong irmen.NOSPAM at xs4all.nl
Sun Dec 30 17:57:02 EST 2012


On 30-12-2012 23:37, Alvaro Lacerda wrote:
> 
> I'm trying to get full number result using the %d command

Try %f instead. %d is the formatting symbol for integer numbers.
See http://docs.python.org/2/library/stdtypes.html#string-formatting-operations

Or have a look at what string.format() can do:
http://docs.python.org/2/library/string.html#format-examples


-irmen





More information about the Python-list mailing list