6 ms·
I'll admit to not having looked at it for about 12 years, and, of course, I'm not saying I couldn't figure out after 2-3 minutes over looking over the pattern,
by ghshephard 12y ago
I'll admit to not having looked at it for about 12 years, and, of course, I'm not saying I couldn't figure out after 2-3 minutes over looking over the pattern, but it just never flowed the way it did with Python for me.
data ={}
data['foo']= [
{'bar':10,'baz':12},
{'bar':20,'baz':13},
{'bar':30,'baz':14}
]
print data['foo'][2]['bar']
data['foo'].append({'bar':40,'baz':15})
for x in data['foo']:
print x['bar']
Maybe it had something to do with indices always being [] brackets and {} only being used to define the dict structure. Or maybe it got easier sometime in the last 12 years? Or, maybe you could onto something, and having come pre-primed with knowledge hashes/arrays, I just picked up python more quickly.
Anyways, it was just a personal story told as well as I could remember it.