PyDocs

Nav

Internet Protocols and Support

IPv4Network.subnet_of

ipaddress

method of IPv4Network · Added in 3.7 (source)
  • IPv4Network.subnet_of(other)
Return True if this network is a subnet of other.
1 Example
>>> a = ip_network('192.168.1.0/24')
>>> b = ip_network('192.168.1.128/30')
>>> b.subnet_of(a)
True
from the Python docs
See Also
No see-alsos for ipaddress/IPv4Network.subnet_of
0 Notes
No notes for IPv4Network.subnet_of