Change to compatible map() for python3