in reply to (jeffa) Re: Converting Python to Perl and back again
in thread Converting Python to Perl and back again
Okay, I've got another fine Python question for you wise Perlmonks (well, know thy enemy, right? ;-). Say I want data such as:
genesis = { "Foxtrot":({"instrumental":"Okay"}, {"vocals":"Good"}), "D +uke":({"vocals":"Better"}) }
How would I go about initially populating the dictionary? Say, as if I was reading from a database and looping over it. There isn't an insert or append operator for dictionaries, and I can't seem to just go: genesis["Foxtrot"]["instrumental"] = "Okay" Any ideas? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 3Re: Converting Python to Perl and back again
by jeffa (Bishop) on Apr 04, 2003 at 13:48 UTC | |
by Anonymous Monk on Apr 04, 2003 at 19:50 UTC |