Look for a string on a file and get its line number

Jeroen Ruigrok van der Werven asmodai at in-nomine.org
Tue Jan 8 07:25:00 EST 2008


-On [20080108 12:59], Wildemar Wildenburger (lasses_weil at klapptsowieso.net) wrote:
>Style note:
>May I suggest enumerate (I find the explicit counting somewhat clunky) 
>and maybe turning it into a generator (I like generators):

Sure, I still have a lot to discover myself with Python.

I'll study your examples, thanks. :)

-- 
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
A conclusion is simply the place where you got tired of thinking...



More information about the Python-list mailing list