python 如何进行以下list 元素去重

如何将以下list去重
url_list=[
{'path':['jy5','xhr','compose','init.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['cType','sid']},
{'path':['jy5','xhr','user','refresh.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['sid']},
{'path':['jy5','xhr','compose','compose.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['action','sid']},
{'path':['jy5','data','analytics.s'],'host':'cwebmail.mail.163.com','method':'GET','query':['product','uid','host','fun','data','_']},
{'path':['jy5','swf','upload2.swf'],'host':'cwebmail.mail.163.com','method':'GET','query':[]},
{'path':['jy5','data','analytics.s'],'host':'cwebmail.mail.163.com','method':'GET','query':['product','uid','host','fun','data','_']},
{'path':['jy5','xhr','user','refresh.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['sid']},
{'path':['jy4-app','xhr','dropbox','account','check.do'],'host':'jy4-app.mail.163.com','method':'POST','query':['utoken','sid']}
]
转换成以下的list
url_list=[
{'path':['jy5','xhr','compose','init.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['cType','sid']},
{'path':['jy5','xhr','user','refresh.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['sid']},
{'path':['jy5','xhr','compose','compose.do'],'host':'cwebmail.mail.163.com','method':'POST','query':['action','sid']},
{'path':['jy5','data','analytics.s'],'host':'cwebmail.mail.163.com','method':'GET','query':['product','uid','host','fun','data','_']},
{'path':['jy5','swf','upload2.swf'],'host':'cwebmail.mail.163.com','method':'GET','query':[]},
{'path':['jy4-app','xhr','dropbox','account','check.do'],'host':'jy4-app.mail.163.com','method':'POST','query':['utoken','sid']}
]
回首忆惘然
浏览 518回答 2
2回答

MMMHUHU

想到一个办法,不知道有没有更好的方法?欢迎回答url_list_uniq=[]forurlinurl_list:ifurlnotinurl_list_uniq:url_list_uniq.append(url)printurl_list_uniq
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript