Processing text using python

Alex Martelli aleaxit at yahoo.com
Mon Feb 20 11:24:04 EST 2006


nuttydevil <sjw28 at sussex.ac.uk> wrote:

> Hey everyone! I'm hoping someone will be able to help me, cause I
> haven't had success searching on the web so far... I have large chunks
> of text ( all in a long string) that are currently all in separate
> notebook files. I want to use python to read these strings of text,
> THREE CHARACTERS AT A TIME. (I'm studying the genetic code you see, so
> I need to read and analyse each sequence one codon at a time
> effectively.) Does anyone have any idea of how to do this using python?

Open each file and call thefile.read(3) in a loop, move to the next file
when the current one is exhausted.  What part of this is giving you
problems?


Alex



More information about the Python-list mailing list