📜  在python代码示例中的句子中写入字符串的值

📅  最后修改于: 2022-03-11 14:46:11.735000             🧑  作者: Mango

代码示例1
# This prints out "John is 23 years old."
name = "John"
age = 23
print("%s is %d years old." % (name, age))
# note: the letter is based on the datatype. %s = string, %d = decimal