How to retry a loop in python after getting the exception in ruby u use
begin
a.each do |s|
end
rescue
sleep 2
retry
end
I will use sleep time and just use retry the loop after getting excpetion now i want to do this in python
I know code for exception handling
try:
for i in w:
#Loop code
exception e:
How to retry the loop if there is any exception? #How to retry the loop if any exception occurs