Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python format string

>>> nombre = 357568.12312
>>> nombre2 = 568.568768
>>> nombre3 = -34.3432
>>> nombre4 = 23
>>> print(f'{nombre : >+20_.4f} {nombre2 : >+20_.4f}')
>>> print(f'{nombre3 : >+20_.4f} {nombre4 : >+20_.4f}')

+357_568.1231            +568.5688
     -34.3432             +23.0000
Source by he-arc.github.io #
 
PREVIOUS NEXT
Tagged: #python #format #string
ADD COMMENT
Topic
Name
1+1 =