Re: [Tutor] break and exit

2014-11-21 Thread Alan Gauld
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

Re: [Tutor] break and exit

2014-11-21 Thread Peter Otten
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

[Tutor] break and exit

2014-11-20 Thread James Rieve
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