ImportError: cannot import name Counter

python

Solution

Counter is only supported python2.7 and higher and is not available in earlier versions.

Problem

I have tried using Counter() but everytime I do: ``` from collections import Counter ``` I get an error saying: ``` Traceback (most recent call last): File "<web session>", line 1, in <module> ImportError: cannot import name Counter ``` Do I actually have to make a file that has counter in it and then import it from there or something? I am a beginner so only the most basic answer will do.

Original source