Python: using a dict to speed sorting of a list of tuples,list_dict = {t[0]: t for t in tuple_list}