import re
inventory = ["shoes, 12, 29.99", "shirts, 20, 9.99", "sweatpants, 25, 15.00", "scarves, 13, 7.75"]
pattern = "(?P<product>[a-z]+),\s(?P<quantity>[0-9]+),\s(?P<price>[0-9]*\.[0-9]{2})"

for items in inventory:
    details = re.match(pattern, items)
    print("The store has {quantity} {product}, each for {price} USD".format(**details.groupdict()))