def compare_digest(a, b):
    if not isinstance(a, str) or not isinstance(b, str):
        raise TypeError
    if len(a) != len(b):
        return False
    return reduce(bool.__and__, map(lambda x: x[0] == x[1], zip(a, b)))


@@ -1,8 +1,109 @@
+try:%0A    from functools import reduce%0Aexcept ImportError:%0A    # not necesary in Python 2.x%0A    pass%0A%0A
 def comp

reduce is functools.reduce in Python 3