my list looks like
new_list = [
(72, "How long will it take for the hotel to get my booking information?", 0.0),
(
76,
"How do I get a receipt or invoice for my hotel booking?",
0.26524283859228215,
),
(
110,
"How many days before my travel date should I make a booking?",
0.28599816371516307,
),
(85, "How do I modify a hotel booking?", 0.29273003599115277),
(73, "What is my hotel’s check–in time?", 0.29295387222098623),
(72, "How long will it take for the hotel to get my booking information?"),
]
i want to remove repeated 72 ID, but want to retain the 0.0 score in the first line on new_list
I tried
unique_id = []
for i in range(len(flattened_results)):
if flattened_results[i][0] not in unique_id:
unique_id.append(flattened_results[i][0])