hamming_code.py: Reduce McCabe code complexity (#2140)
hamming_code.py: Reduce McCabe code complexity (#2140)

* hamming_code.py: Reduce McCabe code complexity

As discussed in #2128

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <47a35b99ddbe74edbea9dad62cf9a3b212194173@users.noreply.github.com>
TheAlgorithms/Python