At 09:50 PM 10/27/2005, Johan Meskens CS3 jmcs3 approximated: >what is Python's equivalent of 'last' in perl? > >if flag == 1: > break
Yes. If flag is either 1 or 0 you may code it thus:
if flag:
break
That's not the whole truth. Most types have a value that is seen as false
in boolean expressions.
They includes 0 '' None False [] (,) {}
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
