Python IndexError: list index out of range for loop

So i got this error and i can’t figure it out why.
Can you explain it to me?
enter image description here

enter image description here

>Solution :

You have to use def like this in python:

tab = [1,3,4,6,7,6]
def is77():
    for i in tab:
        print(i)
is77()

Leave a Reply