Dennis Lee Bieber wrote:
> On Thu, 14 Feb 2008 23:55:21 -0800 (PST), Brandon
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Hi all,
>>
>> I'm not sure if I'm calling the right method in a dictionary. I have:
>>
>> for k,v in dict.items():
>
> Don't call your dictio
Dennis Lee Bieber a écrit :
> On Thu, 14 Feb 2008 23:55:21 -0800 (PST), Brandon
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
(snip)
>> MT.fromkeys(NT[0], range(alpha,omega))
>
> Note that NT is a single tuple -- your previous loop throws away the
> prior value and binds
Brandon a écrit :
> Hi all,
>
> I'm not sure if I'm calling the right method in a dictionary. I have:
>
> for k,v in dict.items():
don't use 'dict' as an identifier, this shadows the builtin dict type.
> NT = k,range(alpha,omega)#where alpha and omega are
> previously defined as 1
Hi all,
I'm not sure if I'm calling the right method in a dictionary. I have:
for k,v in dict.items():
NT = k,range(alpha,omega)#where alpha and omega are
previously defined as 1 and 4, respectively
print NT
which gives:
('w', [0,1,2,3])
('x', [0,1,2,3])
('y', [0,1,2,3])
('z',