On Aug 28, 3:47 am, Santiago Romero <[EMAIL PROTECTED]> wrote:
> > I want to read text line-by-line from a text file, but want to ignore
> > only the first line. I know how to do it in Java (Java has been my
> > primary language for the last couple of years) and following is what I
> > have in Pyth
Santiago Romero wrote:
I want to read text line-by-line from a text file, but want to ignore
only the first line. I know how to do it in Java (Java has been my
primary language for the last couple of years) and following is what I
have in Python, but I don't like it and want to learn the better
[EMAIL PROTECTED] writes:
> If the OP needs line numbers elsewhere in the
> code something like the following would work.
>
> infile = open(fileName, 'r')
> for lineNumber, line in enumerate (infile):
> # enumerate returns numbers starting with 0.
> if lineNumber == 0: continue
> print
On Aug 27, 11:12 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 27 Aug 2008 21:11:26 -0700, [EMAIL PROTECTED] wrote:
> > I want to read text line-by-line from a text file, but want to ignore
> > only the first line. I know how to do it in Java (Java has been my
> > primary langua
On Aug 28, 11:53 am, Ken Starks <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hello,
>
> > I am new to Python and have one simple question to which I cannot find
> > a satisfactory solution.
> > I want to read text line-by-line from a text file, but want to ignore
> > only the first lin
> I want to read text line-by-line from a text file, but want to ignore
> only the first line. I know how to do it in Java (Java has been my
> primary language for the last couple of years) and following is what I
> have in Python, but I don't like it and want to learn the better way
> of doing it.
On Aug 28, 6:11 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am new to Python and have one simple question to which I cannot find
> a satisfactory solution.
> I want to read text line-by-line from a text file, but want to ignore
> only the first line. I know how to do it in Jav