Q: 写代码判断IP地址
—————————————————————C++——————————————————
在这里插入代码片
—————————————————————Python——————————————————
import IPy
def is_ip(address):
try:
IPy.IP(address)
return True
except Exception as e:
return False
Q: 写代码判断IP地址
—————————————————————C++——————————————————
在这里插入代码片
—————————————————————Python——————————————————
import IPy
def is_ip(address):
try:
IPy.IP(address)
return True
except Exception as e:
return False