Kent Johnson wrote:
On Thu, May 15, 2008 at 12:58 PM, GTXY20 <[EMAIL PROTECTED]> wrote:
I suspect that I need
to get a better handle on the difference between items() and iteritems() and
what situations would call for them respectively.
items() returns a list, iteritems() returns an iterator.
On Thu, May 15, 2008 at 12:58 PM, GTXY20 <[EMAIL PROTECTED]> wrote:
> I suspect that I need
> to get a better handle on the difference between items() and iteritems() and
> what situations would call for them respectively.
items() returns a list, iteritems() returns an iterator. If you don't
actua
Hi Kent and Bob,
Bob sorry about the previous code snippet (was late) - I had previously been
trying to accomplish with the following:
for k,v in d.items():
u=k[0]
b=k[1]
if 'a' in v:
for k,v in d.items():
if k[0] == u:
for vals in v:
On Thu, May 15, 2008 at 2:40 AM, GTXY20 <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have dictionary like the following:
>
> d={(1,23A):[a,b,c,d], (1,24A):[b,c,d], (2,23A):[a,b], (2,24A):[a,b,c,d]}
>
> I would like to iterate through the dictionary such that if it finds
> the value 'a' in the val
GTXY20 wrote:
Hello all,
I have dictionary like the following:
d={(1,23A):[a,b,c,d], (1,24A):[b,c,d], (2,23A):[a,b], (2,24A):[a,b,c,d]}
I would like to iterate through the dictionary such that if it finds
the value 'a' in the values of the key that it would remove the value
'b' from the value
Hello all,
I have dictionary like the following:
d={(1,23A):[a,b,c,d], (1,24A):[b,c,d], (2,23A):[a,b], (2,24A):[a,b,c,d]}
I would like to iterate through the dictionary such that if it finds
the value 'a' in the values of the key that it would remove the value
'b' from the values list. In addit