Remove duplicates in a list of lists based on the third item in each sublist
问题 I have a list of lists that looks like: c = [['470', '4189.0', 'asdfgw', 'fds'], ['470', '4189.0', 'qwer', 'fds'], ['470', '4189.0', 'qwer', 'dsfs fdv'] ...] c has about 30,000 interior lists. What I'd like to do is eliminate duplicates based on the 4th item on each interior list. So the list of lists above would look like: c = [['470', '4189.0', 'asdfgw', 'fds'],['470', '4189.0', 'qwer', 'dsfs fdv'] ...] Here is what I have so far: d = [] #list that will contain condensed c d.append(c[0])