re: Learning Algorithms with JS, Python and Java 4: MaxChar VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Python could do it even better. import operator from collections import Counter def max_char(s): c = Counter(s) try: return max(c...
 

I like how we can write python like psuedocode with few lines.

count element in an element

=> Counter(s)

Though it can be hard to understand and remember all the shortcuts.

code of conduct - report abuse