[AppleScript] 纯文本查看 复制代码 host_msg = [{'ipv4': ['10.0.0.1'], '10.0.0.1': [{'switch': '00:00:00:00:00:00:00:01', 'port': '4'}]},
{'ipv4': ['10.0.0.3'], '10.0.0.3': [{'switch': '00:00:00:00:00:00:00:0a', 'port': '4'}]},
{'ipv4': ['10.0.0.2'], '10.0.0.2': [{'switch': '00:00:00:00:00:00:00:0b', 'port': '4'}]}]
我想让host_msg按照ipv4大小排序该怎么办?
就是得出下面的输出[AppleScript] 纯文本查看 复制代码 host_msg = [
{'ipv4': ['10.0.0.1'], '10.0.0.1': [{'switch': '00:00:00:00:00:00:00:01', 'port': '4'}]},
{'ipv4': ['10.0.0.2'], '10.0.0.2': [{'switch': '00:00:00:00:00:00:00:0b', 'port': '4'}]},
{'ipv4': ['10.0.0.3'], '10.0.0.3': [{'switch': '00:00:00:00:00:00:00:0a', 'port': '4'}]}]
|