Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "manstey" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I have a text file with about 450,000 lines. Each line has 4-5 fields, > > separated by various delimiters (spaces, @, etc). > > > >

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
> You asked about data structures specifically. The core collections in > python are lists, dicts, and more recently, sets. (oops, also forgot tuples - very much like lists, but immutable) -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a text file with about 450,000 lines. Each line has 4-5 fields, > separated by various delimiters (spaces, @, etc). > > I want to load in the text file and then run routines on it to produce > 2-3 additional fiel

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a text file with about 450,000 lines. Each line has 4-5 fields, > separated by various delimiters (spaces, @, etc). > > I want to load in the text file and then run routines on it to produce > 2-3 additional fiel

Re: Recommended data structure for newbie

2006-05-02 Thread Paddy
Hi Matthew, >From your example, it is hard to work out what character or character string is a separator, and what string needs to become a separate word when seen in the original file. In the example below you need to learn about regular expressions. the split is based on the two RE's held in var

Recommended data structure for newbie

2006-05-02 Thread manstey
Hi, I have a text file with about 450,000 lines. Each line has 4-5 fields, separated by various delimiters (spaces, @, etc). I want to load in the text file and then run routines on it to produce 2-3 additional fields. I am a complete newbie to Python but I have the docs and done some experiment