Re: Splitting lines from a database query

2006-12-26 Thread Peter Machell
Scott David Daniels wrote: > Peter Machell wrote: >> ZeD wrote: >> >> Thanks very much ZeD. This will do what I need to. >> The next step is to do some regex on the phone number to ensure it's >> local and correct. How can I split these up so each value has

Re: Splitting lines from a database query

2006-12-26 Thread Peter Machell
ZeD wrote: > Peter Machell wrote: > >> I have an application where I need to take a query from an existing >> database and send it to a web api. > > [...] > >> There are always 5 values, but some are blank and some are 'None'. >> I'd lik

Splitting lines from a database query

2006-12-26 Thread Peter Machell
I have an application where I need to take a query from an existing database and send it to a web api. Here's a cut down version of my existing code: for foo in mssql.fetch_array(); bar = foo[2] #trims the first result which we don't use for x in bar: for y in x