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

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

05-11 16:12