📌  相关文章
📜  如何在python代码示例中将字符串附加到另一个字符串

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

代码示例1
# Concatenation
string1 = "str"
string2 = "ing"
string3 = string1 + string2
# string3 is str + ing which is 'string'
# OR
print(string1 + string2)            # prints 'string' 

# Format
string3 = f"{string1}{string2}"     # prints 'string'