list index of out range code example

Example 1: python list index out of range

"You're probably trying to access a value that doesn't"
"exist or cant be obtained at the moment."

Example 2: IndexError: list index out of range

#if you are trying to access/call Non-existed value from the list then you will get this error
list1 =[1,2,3,4]
print(list1[4]) #index of 4 not existed in this list1 so then you will get this type of errors.
#Ex:
#index 0-->1
#index 1-->2
#index 2-->3
#index 3-->4
#index 4-->Not defined.