delete column content

Vlastimil Brom vlastimil.brom at gmail.com
Sun Nov 29 13:48:54 EST 2009


2009/11/29 Francesco Pietra <francesco.pietra at accademialucchese.it>:
> Hi:
> How to replace with blank the single-character in column 21 of a pdb
> file (in pdb numbering it is column 22). Attached is an incomplete
> exercise with slices. I am unable to get real plain text with gmail.
>
> Thanks for help
>
> francesco pietra
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>

Do you mean something like

>>> line="abcdefghijklmnopqrstuvwxyz"
>>> line[:21]+line[22:]
'abcdefghijklmnopqrstuwxyz'

?

vbr



More information about the Python-list mailing list