[Tutor] DB qurey Problem

Rick Pasotto rick@niof.net
Wed May 7 12:43:02 2003


On Wed, May 07, 2003 at 12:27:48PM -0400, Daniel Nash wrote:
> 
> I have a DB with email addresses in it
> 
> when I do the following qurey:
> 
> EmailList = db.query("SELECT distinct email FROM users").getresult()
> 
> I get a list like this : [('dan.nash@company.com',), 
> ('fred.smit@company.com',)]
> 
> I want to return this list without the extra comma in each element in the 
> list. Can I do this, if so how? Or am I going to have to get rid of it 
> another way?

EmailList[0][0] does not have a comma in it.
EmailList[1][0] does not have a comma in it.

-- 
"A moral code impossible to practice, a code that demands imperfection
or death, has taught you to dissolve all ideas in fog, to permit no
firm definitions, to regard any concept as approximate & any rule of
conduct as elastic, to hedge on any principle, to compromise on any
value, to take the middle of any road." -- Ayn Rand
    Rick Pasotto    rick@niof.net    http://www.niof.net