get list of dictionary values python code example
Example 1: python get dict values as list
food_list=list(data.values())
print(food_list)
Example 2: python get elements from list of dictionaries
dct = {"Id": 1, "Name": "Suresh", "Location": "Hyderabad"}
uid = dct["Id"]
name = dct["Name"]
location = dct["Location"]
print("Id = {}, Name = {}, Location = {}".format(uid, name, location))
Example 3: list of dict values
list(d.values())