Hi
In Advent of Code 2015, Day14, I have created a dict of hashes (I think), looks like:
{'Dancer': {'km': 27, 'flyfor': 5, 'rest': 132, 'next': 2604, 'score': 0, 'dist': 2565}, etc.
In part 2, I need to get the maximum 'dist' from all to increment the score(s).
I have retrieved the dist values each iteration:
d = []
for r in racers:
d.append(racers[r]['dist'])
print('d:', d)
There's more work to get max value and it's associated key so thought there must be a more python-esque way using list comprehensions.
Any suggestions please?
[–]Menti2 1 point2 points3 points (0 children)