Convert tuples into string

Cameron Simpson cs at zip.com.au
Sun Nov 25 21:21:43 EST 2012


On 25Nov2012 19:09, Smaran Harihar <smaran.harihar at gmail.com> wrote:
| I am connecting to postgres database and fetching the table names but it
| seems that they are being returned in <type 'tuple'>
| 
| How can I convert them to string?

Please show:

  - the code fetching the names; we do not know what library you are
    using or how your are asking for the table names

  - the tuple itself you get back

Printing repr(the-tuple-you-got-back) should present something
meaningful.

I'd imagine it is just a tuple of table name strings, but really I have
no idea from what you have said.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au>

What's the point of having Nebraska if we can't put it to its highest and
best use?       - Patrick Bedard arguing for a 100 mph speed limit



More information about the Python-list mailing list