List contains dictionaries and their values are again list. How to print max value and country name from the values.
data = [{'country':[2,'US']},{'country':[1,'EN']}]
Example: In values 2 is maximum and the country is 'US' so it should print instead of another dictionary. I ran the code below but I didn't get the desired result on, how to be more efficient.
for i in data:
for m,j in i.items():
country = j[1][1]
points = j[1][0]
Example Output:
points = 2
country = 'US'