class grocery: def __init__(self, name, quantity=1): self.name = name self.quantity = quantityitems = {}items['A'] = grocery('A')items['B'] = grocery('B',2)for item in items.keys(): print "Grocery : ", items[item].name, print "tQuantity: ", items[item].quantity
Name (required)
email (will not be published) (required)
Website