Jul-17-2020, 06:11 AM
Let’s say
Would pull from the 3rd item and the 1st element of said item [2][0] but that doesn’t seem to be what is going on here ,How is x[2][0] = 3 coming out to be [0,1,[3]] ?
x = [0, 1, [2]] x[2][0] = 3 print(x)I found this in a book I was scanning through, ok so I’m still trying to understand how this works because it was my understanding that if you used square brackets in this manner the code
Would pull from the 3rd item and the 1st element of said item [2][0] but that doesn’t seem to be what is going on here ,How is x[2][0] = 3 coming out to be [0,1,[3]] ?