Convert a map iterable to list to use len in python 3.x