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.

23rd Jul 2017, 1:41 PM
sunandan
sunandan - avatar
4 ответов
+ 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
24th Jul 2017, 7:27 AM
visph
visph - avatar
+ 1
I agree with Frédéric... There is no error 😀
23rd Jul 2017, 1:56 PM
Manolis Papadakis
Manolis Papadakis - avatar
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.
23rd Jul 2017, 1:50 PM
Frederik Stenberg
Frederik Stenberg - avatar
- 1
error coming while assigng or dereferencing
23rd Jul 2017, 1:53 PM
sunandan
sunandan - avatar