On 21/11/14 04:10, James Rieve wrote:
I accidently used 'exit' in a loop where I meant to use 'break' and, in that
case, the program seemed to work as expected but in some cases 'exit' seems
to behave differently from 'break'. For example, in this code snippet using
'exit' or 'break' produces the
James Rieve wrote:
> I accidently used 'exit' in a loop where I meant to use 'break' and, in
> that case, the program seemed to work as expected but in some cases 'exit'
> seems to behave differently from 'break'. For example, in this code
> snippet using 'exit' or 'break' produces the same result
I accidently used 'exit' in a loop where I meant to use 'break' and, in that
case, the program seemed to work as expected but in some cases 'exit' seems
to behave differently from 'break'. For example, in this code snippet using
'exit' or 'break' produces the same result:
for i in range(10):
i