Extract String From Enclosing Tuple
rshepard at nospam.appl-ecosys.com
rshepard at nospam.appl-ecosys.com
Thu Mar 1 09:34:59 EST 2007
On 2007-02-28, attn.steven.kuo at gmail.com <attn.steven.kuo at gmail.com> wrote:
>>>> import itertools
>>>> tuple(itertools.chain((t[0], t2[0].encode('ascii')), t[2:]))
> ('eco', 'Roads', 0.073969887301348305)
Steven,
As suggested in the previous article, I handled it where the values are
read from the list retrieved from the database. By adding an additional
index of [0] the format is correct.
Thank you all very much,
Rich
More information about the Python-list
mailing list