Fix Python 3.x compatibility, don't special-case lists/tuples

map() is a generator in Py3