Juan Carlos Rodrigo Garcia wrote: > It is easier if we see it beforehand: > ------------------------------------- > > leave = False > alist = [1,2,3,3,4,5,6,7,8,9] > for item in alist and not leave: > if item is 1: leave = True Interesting idea, but not really needed given the existence of the break statement: for item in alist: if item is 1: break Cheers, Nick. -- Nick Coghlan | ncoghlan at email.com | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4