what I am trying to do here is append the element form the_list with the greatest value
in the [-1] position . i started by creating an index dictionary for the elements in the_list but i started to get lost in the logic flow.
the_list = [['a','b','c','1'],['b','c','e','4'],['d','e','f','2']]
D_indx_element = {}
D_indx_value = {}
output = []
temp = []
for i,k in zip(range(0,len(the_list)),the_list):
D_indx_element[i] = k
temp.append(int(k[-1]))
D_indx_value[i] = int(k[-1])
in the end i would like to have:
output = [['b','c','e','4']]
since 4 is greater than 1 and 2