# Python 3 has a std lib
# module for working with
# IP addresses:
>>> import ipaddress
>>> ipaddress.ip_address('192.168.1.2')
IPv4Address('192.168.1.2')
>>> ipaddress.ip_address('2001:af3::')
IPv6Address('2001:af3::')
# Learn more here:
# https://docs.python.org/3/library/ipaddress.html
版权归属:
admin
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区