Re: Newbie: adding string values to a list?

2005-12-22 Thread planetthoughtful
Hi, Thanks to all for your amazingly quick help! I'm learning much about Python every day. Much warmth, planetthoughtful -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: adding string values to a list?

2005-12-21 Thread Larry Bates
planetthoughtful wrote: > Hi All, > > Sorry for the influx of newbie questions -- I'm trying to figure these > things out on my own before bothering the community, but a lot of bits > and pieces are escaping me at the moment. > > I'm retrieving a result set from an SQLite db (using the APSW modul

Re: Newbie: adding string values to a list?

2005-12-21 Thread bonono
planetthoughtful wrote: > Hi All, > > Sorry for the influx of newbie questions -- I'm trying to figure these > things out on my own before bothering the community, but a lot of bits > and pieces are escaping me at the moment. > > I'm retrieving a result set from an SQLite db (using the APSW module

Re: Newbie: adding string values to a list?

2005-12-21 Thread Tim N. van der Leeuw
You need to use result.append(...) instead of result.extend(...) (Been stumped with that myself too, several times, when I was still a newby... Except was using the operator '+=' I think) cheers, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: adding string values to a list?

2005-12-21 Thread Duncan Booth
planetthoughtful wrote: > result = [] > for name in cursor.execute("SELECT name, address FROM contacts ORDER BY > name"): > result.extend(name) > > print result > > For reasons I (obviously) don't understand, the "name" values get > broken up into each individual letter of the values in the

Newbie: adding string values to a list?

2005-12-21 Thread planetthoughtful
Hi All, Sorry for the influx of newbie questions -- I'm trying to figure these things out on my own before bothering the community, but a lot of bits and pieces are escaping me at the moment. I'm retrieving a result set from an SQLite db (using the APSW module) and I want to add the value from on