+ 1

What should I do if I get these two errors: NZEC and type object not subscriptable, see h=list[] type something

https://code.sololearn.com/cmUz83klPAHK/?ref=app

20th Jun 2019, 1:06 PM
Nikhil Tale
Nikhil Tale - avatar
11 ответов
+ 4
The most helpful thing at the moment would be to see your code.
20th Jun 2019, 1:36 PM
Lothar
Lothar - avatar
+ 1
Yeah this is correct way
20th Jun 2019, 3:01 PM
Nikhil Tale
Nikhil Tale - avatar
0
See my codes now
20th Jun 2019, 1:56 PM
Nikhil Tale
Nikhil Tale - avatar
0
Nikhil Tale What is h = list[6] supposed to do in your code?
20th Jun 2019, 2:34 PM
Juho Pesonen
Juho Pesonen - avatar
0
I am defining h as a list with index 6, actually first I tried to use just without index but it shown me error
20th Jun 2019, 2:38 PM
Nikhil Tale
Nikhil Tale - avatar
0
Nikhil Tale If you’re trying to make a list with six elements just do: h= [None, None, None, None, None, None]
20th Jun 2019, 2:44 PM
Juho Pesonen
Juho Pesonen - avatar
0
Okay but what if I want to make a list which has variable index every time I call it
20th Jun 2019, 2:46 PM
Nikhil Tale
Nikhil Tale - avatar
0
Nikhil Tale So what should be in the list? I’m not sure what you mean with variable index.
20th Jun 2019, 2:51 PM
Juho Pesonen
Juho Pesonen - avatar