+ 4

How is counter implemented?

Counter is a sublass of dict. I wanted to see, how it is implemented. I see initialization but don't understand. How is Counter("12") implemented? https://code.sololearn.com/cXZAn8QHk11T/?ref=app

4th Mar 2021, 12:35 PM
Oma Falk
Oma Falk - avatar
4 Answers
+ 2
please clarify your question, the following was enough for me: from collections import Counter print(help(Counter))
4th Mar 2021, 10:48 PM
Vitaly Sokol
Vitaly Sokol - avatar
0
hey frogged/oma, i admire your codes on sololearn. are you looking for the source code? it may have to do with ‘super’ keyword and inheretance. the super keyword means that it inherets dictionary’s properties and methods i think? idk, may be out of my league a bit
4th Mar 2021, 2:02 PM
madeline
madeline - avatar
- 2
print ('am new here someone help me')
10th Mar 2021, 9:10 PM
Patrick Okorie
Patrick Okorie - avatar
- 2
Add me up on WhatsApp 09057616051
10th Mar 2021, 9:11 PM
Patrick Okorie
Patrick Okorie - avatar