Python code implementing Zif's Law