如何在Python中对列表进行排序

时间:2014-04-15 12:06:30

标签: python sorting

我有Python数据:

[
 ['prod_nominal.BloomConnectorForex.HQ', '192.168.7.14', '2670', 'branches/release'],
 ['prod_nominal.BloomConnectorFIX.HQ', '192.168.7.14', '2670', 'branches/release'],
 ['prod_nominal.IntegralConnector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.CitiConnector.HQ', '192.168.1.77', '2717', 'trunk'], 
 ['prod_nominal.SaxoConnector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.InstrumentMonitor.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.PriceMonitor.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.CFH_GM_Connector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.CFHConnectorMD.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.FXOpenConnector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.CFHConnector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.CFH_GM_Demo_Connector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.FXCMConnector.HQ', '192.168.1.77', '2770', 'trunk'], 
 ['prod_nominal.LMAXConnector.HQ', '192.168.1.77', '2670', 'branches/release'], 
 ['prod_nominal.wide_spread_remover.HQ', '192.168.1.77', '2670', 'branches/release']
]

我想按字段(带IP号码)对此列表的元素进行排序。 Python中有谓词或类似技术吗?我是Python的新手。

0 个答案:

没有答案