Francesco Pietra <[EMAIL PROTECTED]> wrote:
> ATOM 3424 N LEU B 428 143.814 87.271 77.726 1.00115.20
> 2SG3426
> ATOM 3425 CA LEU B 428 142.918 87.524 78.875 1.00115.20
> 2SG3427
[...]
> As you can see, the number of lines for a particular value in column 6
> c
Francesco Pietra wrote:
Hi;
Hi,
Let L be a data line
I would like to renumber, starting from 1, column 6 (i.e, 428 become
1, 429 becomes 2, etc for a very long list)
So you want to subtract 427 from each entry in L[22:26]
ATOM 3424 N LEU B 428 143.814 87.271 77.726 1.00115.2
John Machin:
> Is this homework? Have you put any effort into trying to write a script
> yourself? Etc etc etc
You are right, I am sorry -.-
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Francesco Pietra, few notes:
- In Python and C item numbering generally starts from 0, so you talk
about column 0, 1, etc.
- You can also use the Italian Python newsgroup if know Italian.
- The number of lines with a particular number doesn't seem important
to solve your problem.
- You don't need t
On Sep 3, 6:57 am, "Francesco Pietra" <[EMAIL PROTECTED]> wrote:
> Hi;
>
> I would like to renumber, starting from 1, column 6 (i.e, 428 become
> 1, 429 becomes 2, etc for a very long list)
>
> ATOM 3424 N LEU B 428 143.814 87.271 77.726 1.00115.20
> 2SG3426
[snip]
> ATOM 3437
Hi;
I would like to renumber, starting from 1, column 6 (i.e, 428 become
1, 429 becomes 2, etc for a very long list)
ATOM 3424 N LEU B 428 143.814 87.271 77.726 1.00115.20 2SG3426
ATOM 3425 CA LEU B 428 142.918 87.524 78.875 1.00115.20 2SG3427
ATOM 3426 CB L