In Python 3.0.1, I am attempting to use the Counter part of the collections module
Everywhere I look in the documentation…there is nothing that says this part of the module is not available in Python 3.0.1. But…
from collections import Counter
from collections import counter
from Collections import Counter
from Collections import counter
All yield errors for me…Why is this???
collections.Counterwas added in version 3.1. Either upgrade to 3.2 or implement the class yourself. There’s a recipe here.