Using List for Accumulation:
Instead of string concatenation within the loop, result.append() is used to create a list, and join is called at the end to concatenate the list into a string. This is more efficient for larger strings.
Removed Unnecessary Parameter n:
Eliminating the n parameter makes the function simpler and ensures consistent ROT13 encryption/decryption.
Refactored Doctest and Assertions:
The doctest examples are consistent with the revised function, ensuring reversibility through dencrypt(dencrypt(s)) == s without additional parameters.
* fix(mypy): type annotations for cipher algorithms
* Update mypy workflow to include cipher directory
* fix: mypy errors in hill_cipher.py
* fix build errors
* autoblack: actions/checkout@v1 # Use v1, NOT v2
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>