Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print two values using f string

#!/usr/bin/python

name = 'Peter'
age = 23

print('%s is %d years old' % (name, age))
print('{} is {} years old'.format(name, age))
print(f'{name} is {age} years old')
Source by zetcode.com #
 
PREVIOUS NEXT
Tagged: #print #values #string
ADD COMMENT
Topic
Name
4+7 =