On Mon, 6 Dec 2004, kumar s wrote:
> Here is how my file looks:
>
> Name=3492_at
> Cell1=481 13 (The space between (481 and 13 is tab)
> Cell1=481 13
> Cell1=481 13
> Name=1001_at
> Cell1=481 13
> Cell2=481 12
> Cell1=481 13
> Cell1=481 13
> Cell2=481 12
> Name=1002_at
> Cell3=482 12
> Cell1=481 13
> Cell1=481 13
> Cell2=481 12
> Cell3=482 12
> Cell4=482 13
> Cell1=481 13
>
> My question:
>
> 1. How can I remove the line where Name identfier
> exists and get two columns of data.
Hi Kumar,
You may want to separate that question into two parts:
1. For a given file, how can I remove the lines where Name identfier
exists?
2. For a given file, how can I get two columns of data?
This separation means that you don't have to solve the whole thing at once
to see progress.
If you do problem 2 first, then you can "hardcode" the input to something
that problem 2 can deal with. That is, you can take a smaller version of
your input file, and manually remove the 'name' lines. That way, you can
still do problem 2 without getting stuck on problem1. And when you do get
problem 1 done, then you can just drop the 'hardcoded' test data.
What parts are you stuck on, and what have you tried so far? Do you know
about using 'if' statements yet? What do you know about list manipulation
so far? What about string manipulation?
Please feel free to ask more questions. Good luck!
_______________________________________________
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor