-1
Well, I am having trouble accessing the 3° index of my list. When I try to access, returns me an error of: List index out of range.
vertices = [[-1,-1,1],
[-1,1,1],
[1,1,1],
[1,-1,1]]
for v in vertices:
print(v[3])
I want to access the vertices, 1,-1,1. But I always come across this error.
The indexes of each v go from 0 to 2 in this example of yours. What you expect to have in 3?
– bfavaretto
[1,-1,1]
is invertices[3]
, nayv[3]
. Thev
is each of the internal lists, with 3 numbers each.– bfavaretto