def is_neighbor(a, b):
    """
    Returns whether or not two networks are neighbors. 
    Two networks are neighbors if and only if they differ by the deletion/addition of a node.
    """
    diff = sum([x != y for x, y in zip(list(a), list(b))])
    if a.count("1") != b.count("1") and diff == 1:
        return True
    return False