You need to reset your items_dict when you see an hg17 line.
Here is one way to do it. I used a class to make it easier to break the problem into functions.
Putting the functions in a class makes it easy to share the header and counts.
class Grouper:
''' Process a sequence of strings of the f
Hello once more.
I am stuck on how best to tie the finding Unique Items in Lists ideas to my file
I am stuck at level below: What I have here taken from the unique
items thread does not work as I need to separate each grouping to the
hg chain it is in (see below for examples)
import sys
WFILE=o