- first question
Suppose
b=[ [1,[2,3,4]], [4,[-2,1,0]] ]
for i in 1:length(b)
for a in b[i][2]
print(a)
end
end
I am getting 2 3 4 -2 1 0
instead of [2,3,4] ; [-2,1,0]
- Second question
Why the following code is giving error
[a for a in b[i][2] for i in 1:length(b)]
UndefVarError: i not defined