reposition a column

MRAB python at mrabarnett.plus.com
Wed Nov 25 17:25:06 EST 2009


Francesco Pietra wrote:
> Hi:
> 
> In a pdb file made of lines "ATOM .." (see attachment as I was unable
> to obtain plain text with gmail) I would like to reposition the second
> "W" from column 19 to 17 ( (Python numbering; in pdb numbering it
> would be 20 18). I started with bold slices, then I was unable to
> complete the script. Much obliged for help.
> 
I'm assuming that you want to put a space where the 'W' was.

L = L[ : 17] + L[19] + L[18] + ' ' + L[20 : ]




More information about the Python-list mailing list