Python essayez alors changez quelque chose et réessayez en cas d'échec

for i in range(0,100):
    while True:
        try:
            # do stuff
        except SomeSpecificException:
            continue
        break
Terror12