Rotating Square Code Design | Python