Answers for "Python f string example"

22

python f string

>>> name = "Eric"
>>> age = 74
>>> f"Hello, {name}. You are {age}."
'Hello, Eric. You are 74.'
Posted by: Guest on November-17-2019
1

Python f string example

name = "Sleepy Joe"
age = 1300

print(f"{name} is {age:,} years old")
Posted by: Guest on May-16-2021

Browse Popular Code Answers by Language