I'm trying to print out the keys of my grocery list in the same order they are written in the dictionary originally, this only helps me print the keys alphabetically.
Here is my code currently:
grocery_list = {
"name": "milk",
"cost": "2.99",
"quantity": "2",
}
for i in sorted(grocery_list.keys()):
print(grocery_list[i])