Re: Building a dict from a tuple of tuples

2010-02-20 Thread vsoler
On Feb 20, 8:54 pm, MRAB wrote: > vsoler wrote: > > On Feb 20, 7:00 pm, MRAB wrote: > >> vsoler wrote: > >>> Hello everyone! > >>> I have a tuple of tuples, coming from an Excel range, such as this: > >>> ((None, u'x', u'y'), > >>> (u'a', 1.0, 7.0), > >>> (u'b', None, 8.0)) > >>> I need to build

Re: Building a dict from a tuple of tuples

2010-02-20 Thread MRAB
vsoler wrote: On Feb 20, 7:00 pm, MRAB wrote: vsoler wrote: Hello everyone! I have a tuple of tuples, coming from an Excel range, such as this: ((None, u'x', u'y'), (u'a', 1.0, 7.0), (u'b', None, 8.0)) I need to build a dictionary that has, as key, the row and column header. For example: d={ (

Re: Building a dict from a tuple of tuples

2010-02-20 Thread vsoler
On Feb 20, 7:00 pm, MRAB wrote: > vsoler wrote: > > Hello everyone! > > > I have a tuple of tuples, coming from an Excel range, such as this: > > > ((None, u'x', u'y'), > > (u'a', 1.0, 7.0), > > (u'b', None, 8.0)) > > > I need to build a dictionary that has, as key, the row and column > > header.

Re: Building a dict from a tuple of tuples

2010-02-20 Thread MRAB
vsoler wrote: Hello everyone! I have a tuple of tuples, coming from an Excel range, such as this: ((None, u'x', u'y'), (u'a', 1.0, 7.0), (u'b', None, 8.0)) I need to build a dictionary that has, as key, the row and column header. For example: d={ (u'a',u'x'):1.0, (u'a',u'y'): 7.0, (u'b',u'y')