[portland] Still Having List/Tuple Problems

Rich Shepard rshepard at appl-ecosys.com
Thu Apr 17 01:24:48 CEST 2008

On Wed, 16 Apr 2008, kirby urner wrote:

>>>> thekeys = set([i for (i,j) in mydata])

   I thought this more elegant, but when I could not use the 'j' values
associated with each 'i' value I did some reading on sets. They are
iterable, but not indexable. And I need to access each 'j' associated with
each 'i'.

   But, I learned quite a bit. I think the groupby() approach is most
suitable for my need.

Thanks all,


Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

More information about the Portland mailing list