Hacker News new | ask | show | jobs
by sidpatil 1917 days ago
I see what you're saying, regarding the histogram code. A cleaner approach would have been to store the translations in a named tuple or Dict and iterated through it.

One of the other commenters also mentioned the `replace` function, which could be used in place of a loop.