zipfs-law
·33 words·1 min
zipfs-law #
ranked = sorted(RANK.items(), key=lambda x: x[1], reverse=True)
most_used = "\n" + "".join([f"- {x}: {y}\n" for x, y in ranked[:10]])
least_used = "\n" + "".join([f"- {x}: {y}\n" for x, y in ranked[-10:]])
ranked = sorted(RANK.items(), key=lambda x: x[1], reverse=True)
most_used = "\n" + "".join([f"- {x}: {y}\n" for x, y in ranked[:10]])
least_used = "\n" + "".join([f"- {x}: {y}\n" for x, y in ranked[-10:]])