repeat an iteration of for loop

Do it like this:

for eachId in listOfIds:
    successful = False
    while not successful:        
        response = makeRequest(eachId)
        if response == 'market is closed':
            time.sleep(24*60*60) #sleep for one day
        else:
            successful = True

The title of your question is the clue. Repeating is achieved by iteration, and in this case you can do it simply with a nested while.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)