GH avatar Bite 190. Parse income distribution from Latin America XML

In this Bite you are going to parse some Latin American countries in xml, specifically the output of which we stored here. It's already saved for you in the countries temp file.

Complete get_income_distribution by reading in this file, parsing its XML and returning a dict of keys = wb:incomeLevel and values = lists of country names (wb:name). defaultdict is a convenient data structure to use here. See also the tests for the expected return.

Good luck and code more Python!

17 out of 19 users completed this Bite.
Will you be Pythonista #18 to crack this Bite?
It takes an average of ~45 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 7.5 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Buy Now Login and get coding
We use Python 3.7