Python list thing. (INdex out of range)
most of hte time I forget this thing and consumes my time.
if I have a list:
a = [‘435 456 123 334 769’]
will give output same as – > [‘435 456 123 334 769’]
but if i run print a it will return Index Out of range. Obvious thing….
So what I do to solve this
for numbers in a.split():
Which gives me exact thing I need. Actually split() function splits all the elements of list in the given index.