6 Answers
+ 4
I don't think there is a course specifically about the Counter class, but you can find details on the web:
https://stackabuse.com/introduction-to-pythons-collections-module/
+ 2
It counts the no of occurrences of each letter and implement them as key value pair in dictionary
You need to import it from collections to use it
+ 2
from collections import Counter
print(Counter(['a','b','b','b','a','c']))
+ 1
Ty does anyone know in the python course where does it go over counter. I looked through the sections in control structure and I must have missed it. For instance that whole line "from collections import counter" I never even seen that in the python tutorial.
+ 1
Thank you
0
Can you give me a basic example of what you said so I can study it for example what did I do wrong in the code above