Return an estimated length for the object obj. First try to return its actual length, then an estimate using object.__length_hint__(), and finally return the default value.
operator.length_hint(obj, default=0)