Had trouble with the list comprehension part.

Went ahead and did it with a loop. Couldn't get the different syntax to work using a list comprehension for avgAgeByGender.