Exhaust the map iterator for python 3