Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python f strings formatting numbers

from random import randint
for i in range(5):
    print(f'My money is {randint(0, 150):>3}$')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #strings #formatting #numbers
ADD COMMENT
Topic
Name
4+4 =