Trying to access the n-th element of a list gives ValueError when using .index()
- index
- valueerror
- list
I have a list
of n-many objects - why does list.index(0)
raise a ValueError
and not return the first item?
Trying to access the n-th element of a list gives ValueError when using .index()
I have a list
of n-many objects - why does list.index(0)
raise a ValueError
and not return the first item?