python 字符串拼接

str1 = 'abc'
str2 = 'def'
str3 = str1 + str2
print(str3)

这种方法只需要申请一次内存。

posted @ 2019-03-03 22:47  噼里巴啦  阅读(91)  评论(0)    收藏  举报