【发布时间】:2017-09-13 13:58:37
【问题描述】:
x = {1, 2, 3}
y = {4, 5, 6}
z = x + y
我有两个表x 和y,只想创建第三个表,它只是它们两个的元素(未排序)。我努力使用上面的代码,但这给出了错误input:3: attempt to perform arithmetic on a table value (global 'x')...
【问题讨论】:
-
如果
x = { 1, 2, 3 }和y = { 3, 4, 5 },应该z = x + y = { 1, 2, 3, 4, 5}(无重复)还是{ 1, 2, 3, 3, 4, 5 }(可能重复)?