def is_bijection(map):
    """
    Return True if mapping is a bijection and False otherwise

    Example:
        >>> is_bijection({1: 2, 3: 5})
        True

        >>> is_bijection({1: 2, 3: 2})
        False
    """
    try:
        unique = set(map.values())
    except TypeError:
        pass
    else:
        return len(unique) == len(map)
    unique = []
    for v in map.values():
        if v in unique:
            return False
        unique.append(v)
    return True
