Answers for "python how to print values into a string"

2

embed variables python

#Pre 3.6
print('Hi, my name is {name} and my age is {age}'.format(**locals()))

#After 3.6
print('Hi, my name is {name} and my age is {age}')
Posted by: Guest on July-22-2020
0

python inline print variable

print(f'I have {a} {b}')
Posted by: Guest on November-17-2020

Code answers related to "python how to print values into a string"

Python Answers by Framework

Browse Popular Code Answers by Language