[Tutor] creating dict of dict : similar to perl hash of hash

Abhishek Pratap abhishek.vit at gmail.com
Tue Mar 6 18:50:55 CET 2012


Hi Guys

I am looking for a way to build dictionaries of dict in python.

For example in perl I could do

my $hash_ref = {};
$hash->{$a}->{$b}->{$c} = "value";
if (exists $hash->{$a}->{$b}->{$c} ){ print "found value"}

Can I do something similar with dictionaries in Python.


Thanks
-Abhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120306/d076ffc8/attachment.html>


More information about the Tutor mailing list