remove last 76 letters from string
MRAB
python at mrabarnett.plus.com
Thu Aug 6 06:34:24 EDT 2009
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.
More information about the Python-list
mailing list