This works;

>>> for result in results:
        flat = list(item for group in result for item in group)
        print [sum([1 for el in flat if el==current]) for current in flat]

        
[1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 1, 1, 1, 1]

But I am still open to suggestions if anyone thinks this can be improved.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to