I am having an issue with last part of a code I'm creating. I am trying to, for example, make the list iterate to item 3 normally, but then check if the item is 3 and other condition (which doesn't matter right now), then change the index to iterate from example 10.
I made a lot of attempts but it doesn't seem to work.
li = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
for i in range(0,len(li)):
print(i)
if i == 3: #along with other condition
def g(li):
global i
i = li[9]
g()
print(i)