import ipaddress


def is_in_network(ip, net):
    """ Check if an IP address is part of a network
    
    Arguments:
    ip: IP address
    net: Network wich mask bits (like '1.3.4.0/24')

    Returns True if IP address is in the network, else False
    """
    return ipaddress.ip_address(ip) in ipaddress.ip_network(net)