loading...
re: I wondered if I could do better performance-wise, based on knowledge of the problem that the more general built-in classes couldn't take advantage ...

Nice! I haven't used fromkeys before. That's a nice alternative to defaultdict (and you don't have to import anything!) if you already know the keys you need.

Code of Conduct Report abuse