我有一个列表,它是函数的结果,列表是这样的:
lovers=[['Warner', 'Lugar'], ['Warner', 'Murkowski'], ['Warner', 'Smith'], ['Chambliss', 'Allard'], ['Chambliss', 'Isakson'], ['Lugar', 'Warner'], ['Lugar', 'Murkowski'], ['Lugar', 'Smith'], ['Murkowski', 'Warner'], ['Murkowski', 'Lugar'], ['Murkowski', 'Smith'], ['Allard', 'Chambliss'], ['Allard', 'Isakson'], ['Smith', 'Warner'], ['Smith', 'Lugar'], ['Smith', 'Murkowski'], ['Grassley', 'Talent'], ['Grassley', 'Bond'], ['Grassley', 'Allen'], ['Grassley', 'Roberts'], ['Talent', 'Grassley'], ['Talent', 'Bond'], ['Talent', 'Allen'], ['Talent', 'Roberts'], ['Durbin', 'Sarbanes'], ['Bond', 'Grassley'], ['Bond', 'Talent'], ['Bond', 'Allen'], ['Bond', 'Roberts'], ['Allen', 'Grassley'], ['Allen', 'Talent'], ['Allen', 'Bond'], ['Allen', 'Roberts'], ['Sarbanes', 'Durbin'], ['Roberts', 'Grassley'], ['Roberts', 'Talent'], ['Roberts', 'Bond'], ['Roberts', 'Allen'], ['Isakson', 'Chambliss'], ['Isakson', 'Allard']]
我想要将此列表转换为有重复项的列表。即如果['Warner', 'Lugar']
已经存在那么我不想要['Lugar', 'Warner']
。我怎样才能做到这一点?