Concatenation operator สร้าง tuple ใหม่จาก tuple เริ่มต้นตามลำดับที่บวกเข้ามา ไม่ใช่ in-place operation
ตัวอย่าง
tuple1 = [1, 2, 3]
tuple2 = ['a', 'b']
tuple3 = tuple1 + tuple2
print(tuple3)
ผลลัพธ์
[1, 2, 3, 'a', 'b']
Concatenation operator สร้าง tuple ใหม่จาก tuple เริ่มต้นตามลำดับที่บวกเข้ามา ไม่ใช่ in-place operation
tuple1 = [1, 2, 3]
tuple2 = ['a', 'b']
tuple3 = tuple1 + tuple2
print(tuple3)
[1, 2, 3, 'a', 'b']