var inventory = {
"Apple": {"Cost": 0.99, "Stock": 3},
"Orange": {"Cost": 1.49, "Stock": 11},
"Grapes": {"Cost": 3.99, "Stock": 2},
}
for item in inventory.keys():
var data = inventory[item]
var stock = data["Stock"]
var cost = data["Cost"]
var name = item
if !item.ends_with("s"):
name += "s"
print("There are %d %s, and they cost %.2f each." % [ stock, name, cost ])