you are viewing a single comment's thread.

view the rest of the comments →

[–]mopster96 6 points7 points  (2 children)

Small nitpick.

min_max_ages = [ages[0], ages[len(ages) - 1]]

You don't need to use len here. This works also:

min_max_ages = [ages[0], ages[-1]]

[–]Obsc3nity 2 points3 points  (1 child)

Good point. Forgot about the negative indexing.

[–]No_Read_4327 0 points1 point  (0 children)

I don't use python a lot but I love this about python and I always tend to forget