[mw_shl_code=applescript,true]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'}]}]
[/mw_shl_code]
我想让host_msg按照ipv4大小排序该怎么办?
就是得出下面的输出[mw_shl_code=applescript,true]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'}]}]
[/mw_shl_code] |
|