Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Old style formatting

>>> x = 12.3456789
>>> print('The value of x is %3.2f' %x)
The value of x is 12.35
>>> print('The value of x is %3.4f' %x)
The value of x is 12.3457
 
PREVIOUS NEXT
Tagged: #Python #Old #style #formatting
ADD COMMENT
Topic
Name
6+5 =