remove last 76 letters from string
Iain King
iainking at gmail.com
Thu Aug 6 09:58:13 EDT 2009
On Aug 6, 11:34 am, MRAB <pyt... at mrabarnett.plus.com> wrote:
> Iain King wrote:
> >> print >>nucleotides, seq[-76]
>
> >> last_part = line.rstrip()[-76 : ]
>
> > You all mean: seq[:-76] , right? (assuming you've already stripped
> > any junk off the end of the string)
>
> The OP said "cut out the last 76 letters (nucleotides) from each
> individual sequence and send them to a new txt file with a similar
> format.", ie extract the last 76 letters (in the same format) to a file.
So he did. Excuse me while I go eat my other foot.
More information about the Python-list
mailing list