Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mhashemi
· 8y ago · 0 comments
That's a great example! Mind if I use it? ;)
Comments
[–]
ziikutv
8y ago
You can also use a list comprehension like so.
>>> sum([x['moons'] for x in target['system']['planets']])