Source Code:
(back to article)
name = 'John' age = 30 # Use the %s placeholder to insert a string into the final string output = 'My name is %s and I am %s years old' % (name, age) print(output) # Output: 'My name is John and I am 30 years old'
Result:
Report an issue