📜  如何将 + 与字符串一起使用 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:01.657000             🧑  作者: Mango

代码示例1
# + is an overloaded operater, meaning it has more than one meaning
 
firstStr = "This is an "
secondStr = "example."
# + can join two strings end to end 
example = firstStr + secondStr
print(example)
# Output -> This is an example. 

#other things you can do
other1 = firstStr + "apple"
other2 = "Stri" + "ng"