website = "http://www.%s.org" value = ("python") print (website % value)
s = Template("hello,$x")
print (s.substitute(x = "sean"))
find用法
"This morning, he's going to walk down the front steps".find("walk")
lower用法
"This morning, he's going to walk down the front steps".lower()
replace用法
"This morning, he's going to walk down the front steps".replace("o","$")
split用法
"1+2+3+4+5".split("+") ['1', '2', '3', '4', '5']
strip用法
"Peter ".strip() 删除前后空格
浙公网安备 33010602011771号