def _ip_in_subnet(subnet, ip):
return (<EOL>_create_ip(subnet, <NUM_LIT:1>) == _create_ip(ip, <NUM_LIT:1>)<EOL>or '<STR_LIT>' == _create_ip(ip, <NUM_LIT:1>)<EOL>)<EOL>
Checks if an ip is included in a subnet.

Note:
    only 255.255.255.0 masks allowed

Args:
    subnet (str): Strign containing the three first elements of the decimal
        representation of a subnet (X.Y.Z) or a full ip (X.Y.Z.A)
    ip (str or int): Decimal ip representation

Returns:
    bool: ``True`` if ip is in subnet, ``False`` otherwise