Tuesday, 20 August 2013

try except handling in python

try except handling in python

I have the following code. I want to come out of else block the moment it
meets with an exception and I want the for loop to continue. But my code
breaks out of the outer for loop as well. Need some help. New to
programming.
for (....):
if (....):
.....
.....
else:
try:
....
except IndexError:
break
Thanks

No comments:

Post a Comment