Re: blank lines representation in python

2006-05-02 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > what is the correct way to represent blank lines in python (while > iterating a file) without regexp? I know one way is to use > re.search((line,r'^$') to grab a blank line, but i wanna try not to use > regexp... > is it > 1) if line == ''": dosomething() (this also mea

blank lines representation in python

2006-05-02 Thread micklee74
hi what is the correct way to represent blank lines in python (while iterating a file) without regexp? I know one way is to use re.search((line,r'^$') to grab a blank line, but i wanna try not to use regexp... is it 1) if line == ''": dosomething() (this also means EOF right? ) 2) if line is None: