On 4/6/2010 2:16 AM, ranjan das wrote:
Hi,
I am new to python, and specially to file handling.
I need to write a program which reads a unique string in a file and
corresponding to the unique string, extracts/reads the n-th line (from
the line in which the unique string occurs).
I say 'n-t
ranjan das wrote:
Hi,
I am new to python, and specially to file handling.
I need to write a program which reads a unique string in a file and
corresponding to the unique string, extracts/reads the n-th line (from the
line in which the unique string occurs).
I say 'n-th line' as I seek a gener
Alan Gauld wrote:
"ranjan das" wrote
For instance lets say the unique string is "documentation" (and
"documentation" occurs more than once in the file). Now, on each
instance
that the string "documentation" occurs in the file, I want to read
the 25th
line (from the line in which the strin
"ranjan das" wrote
For instance lets say the unique string is "documentation" (and
"documentation" occurs more than once in the file). Now, on each instance
that the string "documentation" occurs in the file, I want to read the
25th
line (from the line in which the string "documentation" oc
Hi,
I am new to python, and specially to file handling.
I need to write a program which reads a unique string in a file and
corresponding to the unique string, extracts/reads the n-th line (from the
line in which the unique string occurs).
I say 'n-th line' as I seek a generalized way of doing