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