A shop saves a one-line summary of each basket.
prices is a dictionary of item name to price in whole pounds, like {"tea": 3, "jam": 4}.
Write save_summary(path, prices). It writes one line of text into the file called path, closes it, and returns path. The text is:
1<count> items, total <total>
<count> is how many items are in the dictionary.<total> is all the prices added up.item instead of items.0 items, total 0.Keep the peek helper as it is.