Petr Jakes wrote: > zero_list=[0,0,0,0,0,1,2,3,4] > for x in range(len(zero_list)): > if zero_list[x]!=0: break > nonzero_list=zero_list[x:] > print nonzero_list > > but some more "pythonic" solutions will be posted from other users I > guess :)
That looks perfectly Pythonic to me. You know, just because Python has for loops and multi-line blocks of code doesn't mean we shouldn't use them *wink* -- Steven. -- http://mail.python.org/mailman/listinfo/python-list