IP 与字符串转换 2017 年 2 月 9 日 11:48 IP 转换为字符串: import struct,socket; struct.unpack(“=I”, socket.inet_aton(“203.205.179.171”))[0] 字符串转换为 ip : import struct,socket; socket.inet_ntoa(struct.pack(“=I”, 3398356427))
另外还有 sql 中 aton 等函数可以转换,但是顺序有变
已使用 Microsoft OneNote 2016 创建。