简单类型 / 字符串

fontSize = 14
fontFamily = "Arial"
style1 = "font-size: {0};font-family: \"{1}\"".format(
    fontSize, fontFamily)
# style1 is "font-size: 14;font-family: "Arial""

# method for version 3.6
style2 = f"font-size: {fontSize/2};font-family: \"{fontFamily}\""
# style2 is "font-size: 7.0;font-family: "Arial""

print(f"{style1 = }")
print(f"{style2 = }")