1、新建一个空白的PYTHON文件。

2、先定义一个变量,然后把字符串内容改为另一个字符串
x = "Ben"
y = "My name is %s" %x
print(y)

3、可以把字符串里的改为整型数字。
a = 3
b = "The first number is %d" %a
print(b)

4、%f把整数改为有小数点的数值
c = 9
d = "You are the number %f guy" %c
print(d)

5、当然可以把有小数点的值改一下即可。
e = 8.987987234
f = "The answer is %f" %e
print(e)

6、如果不定义变量,其实也可以修改里面的内容的。
g = "The winner is %s" %"Alice"
print(g)
