I have a python dictionary that I want to look like this:
{"name": "BOB",
"item1": {
"item name": "bread",
"quantity of item ": 10,
"price of item": "3.00"
},
"item2": {
"item name": "milk",
"quantity of item ": 15,
"price of item": "9.00"
}
}
currently it looks like this
{"name": "BOB", "item1": {"item name": "bread", "quantity of item ": 10, "price of item": "3.00"}, "item2": {"item name": "milk", "quantity of item ": 15, "price of item": "9.00"}}
The list of items can be different and does not have a fixed amount of items, so I would also need to to know how to do that
I have tried to add new lines in the dictionaries but it would not work and it would just put '\n' in to my dictionary