[portland] Extracting strings from a tuple

Rich Shepard rshepard at appl-ecosys.com
Sat Nov 3 00:33:19 CET 2007


On Fri, 2 Nov 2007, Matt McCredie wrote:

> My guess is that you are dereferencing from the list incorrectly. If you
> don't want to use intermediate variables this should work:

Matt,

   Yes, that was my problem: not seeing how to properly dereference the list.

> [code]
> returned_data = [(u'string 1', u'string 2', u'string 3', u'string 4',
> u'string 5', u'string6', u'string 7')]
>
> for txt in returned_data[0]:
>    print txt
> [/code]

   Thank you.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |         Accelerators(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863


More information about the Portland mailing list