@@ -0,0 +1,808 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Aimport xml.etree.cElementTree as ET%0Aimport pprint%0Aimport re%0Aimport os%0A%22%22%22%0AYour task is to explore the data a bit more.%0AThe first task is a fun one - find out how many unique users%0Ahave contributed to the map in this particular area!%0A%0AThe function process_map should return a set of unique user IDs (%22uid%22)%0A%22%22%22%0Adef get_user(element):%0A    return element.attrib%5B'user'%5D%0A%0A%0Adef process_map(filename):%0A    users = set()%0A    for _ , element in ET.iterparse(filename):%0A        if 'user' in element.attrib:%0A            user = get_user(element)%0A            users.add(user)%0A        pass%0A    return users%0A%0A%0Adef test():%0A    os.chdir('./data')%0A    users = process_map('example2.osm')%0A    pprint.pprint(users)%0A    assert len(users) == 6%0A%0A%0A%0Aif __name__ == %22__main__%22:%0A    test()

Add a script which find out how many unique users have contributed to the map in this particular area