Need a specific sort of string modification. Can someone help?

Sia hossein.asgharian at gmail.com
Sat Jan 5 03:35:26 EST 2013


I have strings such as:

tA.-2AG.-2AG,-2ag
or
.+3ACG.+5CAACG.+3ACG.+3ACG

The plus and minus signs are always followed by a number (say, i). I want python to find each single plus or minus, remove the sign, the number after it and remove i characters after that. So the two strings above become:

tA..,
and
...

How can I do that?
Thanks.



More information about the Python-list mailing list