python search engine exercise