Thanks to all for the feedback. it worked.
--RR
Tim Chase wrote:
> > how do i create a hash of hash similar to perl using dict in python
> > $x{$y}{z}=$z
>
> Pretty much the same as in perl, only minus half the crazy abuses
> of the ASCII character-set.
>
> Okay...well, not quite half the abuses
> how do i create a hash of hash similar to perl using dict in python
> $x{$y}{z}=$z
Pretty much the same as in perl, only minus half the crazy abuses
of the ASCII character-set.
Okay...well, not quite half the abuses in this case...
>>> x = {}
>>> y = 42
>>> z = 'foonting turlingdromes'
>>
In <[EMAIL PROTECTED]>, sfo wrote:
> how do i create a hash of hash similar to perl using dict in python
> $x{$y}{z}=$z
Just put dictionaries as values into a dictionary.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
sfo wrote:
> how do i create a hash of hash similar to perl using dict in python
> $x{$y}{z}=$z
Haven't done any Perl in a long while (thankfully ;-) ) so I'm not
quite sure on your syntax there, but here's how to do it in Python:
>>> x = {'y': {'z': 'My value'}}
>>> x['y']['z']
'My value'
Much
how do i create a hash of hash similar to perl using dict in python
$x{$y}{z}=$z
thanks.
--RR
--
http://mail.python.org/mailman/listinfo/python-list