How to assign key and values to different variables in the dictionary within the list. I'm using for loop but is there any better approach that I can assign and use the values globally.
data = [{'country':[1,'US']}]
for i in data:
for j in i.items():
type = j[0]
rank = j[1][0]
country = j[1][0]
print(type)
print(rank)
print(country)