1.加法:
s1 = "hap"
s2 = "py"
s = s1+s2
print(s)
----->happy
2.乘法
s1 = "happy"
s = s1*3
print(s)
------>happyhappyhappy
3.字符串可用单引号、双引号、三引号
1.加法:
s1 = "hap"
s2 = "py"
s = s1+s2
print(s)
----->happy
2.乘法
s1 = "happy"
s = s1*3
print(s)
------>happyhappyhappy
3.字符串可用单引号、双引号、三引号
转载于:https://www.cnblogs.com/zmhx/p/10032965.html