Easy question
Brian Quinlan
BrianQ at ActiveState.com
Wed Apr 11 18:15:17 EDT 2001
Kalle wrote:
> The j.strip() is unnecessary, int() does that automagically, IIRC.
You're right. I thought I tried it though - guess not :-)
> Also, this will blow up if there is a tab at the end of the line:
I was assuming that the data format is:
<line> ::= <int>*(\t<int>)*<EOL>
So it would be an error in the datafile if a tab is not succeeded by an
integer. Of course, it all depends on what the original poster wanted :-)
More information about the Python-list
mailing list