I have a simple list of counters:
> counter_list
Counter({'Pig': 1}), Counter(), Counter({'Chicken': 3})
I cannot find an easy way to delete an empty counter.
I tried using
counter_list += Counter()
according to the documentation, no luck.
del
It seems that only deleting the contents of the counter, not the actual counter, and at best just creates a more empty counter.
Any advice is welcome and apologize in advance for the future forehead-slapper.
source
share