3 ms·
15 lines? You must be forgetting about the Counter class from collections. Counter(s.split()).most_common(k) I think there’s a XKCD about importing your s
by wodenokoto 8y ago
15 lines? You must be forgetting about the Counter class from collections.
Counter(s.split()).most_common(k)
I think there’s a XKCD about importing your solution from the standard library.
- jodrellblank 8y ago"import antigravity" - https://xkcd.com/353/ https://xkcd.com/353/