- 使用f"内容{格式化变量名}"
- 使用变量名.format来格式化字符串
type_of_people = 10
x = f"There are {type_of_people} types of people."
binary = "binary"
do_not = "donnot"
y = f"Those who know {binary} and those who {do_not}"
print(x)
print(y)
print(f"i said: {x}")
print(f"i also said: '{y}'")
hilarious = False
joke_evaluation = "isnot that joke so funny ?!{}"
#字符串格式化 变量名.format
print(joke_evaluation.format(hilarious))
w = "This is the left side of ..."
e = "a string with a right side."
print(w + e)