reposition a column
python at mrabarnett.plus.com
Wed Nov 25 23:25:06 CET 2009
Francesco Pietra wrote:
> 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 + L + ' ' + L[20 : ]
More information about the Python-list