Re: Renumbering

2008-09-03 Thread Philipp Pagel
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

Re: Renumbering

2008-09-02 Thread Terry Reedy
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

Re: Renumbering

2008-09-02 Thread bearophileHUGS
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

Re: Renumbering

2008-09-02 Thread bearophileHUGS
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

Re: Renumbering

2008-09-02 Thread John Machin
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

Renumbering

2008-09-02 Thread Francesco Pietra
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