觉得python 很强大
可以用ipy判断ip地址的格式是否正确,如果不正确还可以指出错误原因,感觉学习计网的时候python很有用
>>> from IPy import IP
>>> IP('192.168.1.1').version()
4
>>> IP('fe08::5efe:172.16.18.3').version()
6
>>> IP('5401::13::b0c:3201').version()
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
IP('5401::13::b0c:3201').<