mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
[pre-commit.ci] pre-commit autoupdate (#11275)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.14...v0.2.0) * Upgrade pyproject.toml * Revert sudoku_solver.py RUF017 Avoid quadratic list summation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
committed by
GitHub
parent
4128f19170
commit
ed8d9209da
@@ -67,7 +67,7 @@ def mixed_keyword(
|
||||
if verbose:
|
||||
print(mapping)
|
||||
# create the encrypted text by mapping the plaintext to the modified alphabet
|
||||
return "".join(mapping[char] if char in mapping else char for char in plaintext)
|
||||
return "".join(mapping.get(char, char) for char in plaintext)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user