我做了一个数组:阵副本显示0 1,而不是真正的假斯威夫特
var hugett = [[[true, false], [true, true], [true, true, true], [true, true, false, false], [false]],[]]
以及阵列中取得的第一个索引的副本:
tempott = hugett[0]
BUT!当我打印我得到不同的结果,当我打印原始数组(hugett
):
[[true, false], [true, true], [true, true, true], [true, true, false, false], [false]]
当我打印副本(tempott
),这是我得到:
((
(
1,
0
),
(
1,
1
),
(
1,
1,
1
),
(
1,
1,
0,
0
),
(
0
)
))
相反向我展示真假 - 我的错误是0/1?
我用印刷品打印: print(tempott)。 但问题不在于打印,问题是我需要使用tempott与true和false,因为0/1我不能。 – Eliko
'我用print打印:print(tempott)'对不起,但用'print'打印时我得到的是true和false,而不是0和1.我不能在Playground中重现你的问题。你必须对某件事感到困惑,请检查你的代码。 – Moritz
你是怎么创建你的tempott的? – Eliko