Newbie: Working with large database -- help!

Ian Bicking ianb at colorstudy.com
Wed May 1 02:47:07 EDT 2002


On Wed, 2002-05-01 at 01:12, Jochen Küpper wrote:
> On Tue, 30 Apr 2002 21:37:18 -0400 Owen Marshall wrote:
> 
> Owen> data|data|data|data
> 
> Owen> and so on as needed. My question: how do I extract each part of
> Owen> data from between the " | " (none of the data has fixed
> Owen> lengths), and put it in a list where I can do some work with it?
> 
> list = file.read().split('|')

Or maybe:
list_of_lists = [line.split('|') for line in file.readlines()]

  Ian







More information about the Python-list mailing list