Source Code:
(back to article)
# Formatting with the .format() method name = 'John' age = 30 print('Hello, {}. You are {} years old.'.format(name, age)) # Output: "Hello, John. You are 30 years old."
Result:
Report an issue