0
Num = [10, 11, [ 100, 200, [ 1, 2, 3]], 120]. Num[2][2][1] = 500
Num = [10, 11, [ 100, 200, [ 1, 2, 3]], 120] Num[2][2][1] = 500 last assignment statement giving error can anyone tell what is wrong with this.
4 Réponses
+ 2
Check your code before: often mistake is on previous line of the referenced error (if colon or closing parenthesis missing, for example...), else you may have a character encoding issue: but you need to provide us at least the exact error message produced, and the complete code you run ;P
+ 1
I agree with Frédéric... There is no error 😀
0
Just ran it through with no error. Sure you're not just seeing "No output"?
Add "print(Num)" and the modified array should be printed.
- 1
error coming while assigng or dereferencing