Answers for "how to formate in python"

3

format in python

print('The {2} {1} {0}'.format('fox', 'brown', 'quick'))

result = 100/777

print('{newvar}'.format(newvar = result))

print('the result was {r:0.3f}'.format(r = result))
Posted by: Guest on July-18-2021
1

how to do formatting in python with format function

age = 36
txt = "his age is {}"
print(txt.format(age))
Posted by: Guest on December-22-2021

Code answers related to "how to formate in python"

Python Answers by Framework

Browse Popular Code Answers by Language