Parsing/Splitting Line

John Machin sjmachin at lexicon.net
Tue Nov 21 01:39:45 EST 2006


acatejr at gmail.com wrote:
> I have a text file and each line is a list of values.  The values are
> not delimited, but every four characters is a value.  How do I get
> python to split this kind of data?  Thanks.

1. Look for "slicing" or "slice" or "slices" in the Python tutorial.
2. Write some code.
3. Run it.




More information about the Python-list mailing list