mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
refactor: Move constants outside of variable scope (#7262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -9,16 +9,17 @@ https://www.braingle.com/brainteasers/codes/bifid.php
|
||||
|
||||
import numpy as np
|
||||
|
||||
SQUARE = [
|
||||
["a", "b", "c", "d", "e"],
|
||||
["f", "g", "h", "i", "k"],
|
||||
["l", "m", "n", "o", "p"],
|
||||
["q", "r", "s", "t", "u"],
|
||||
["v", "w", "x", "y", "z"],
|
||||
]
|
||||
|
||||
|
||||
class BifidCipher:
|
||||
def __init__(self) -> None:
|
||||
SQUARE = [ # noqa: N806
|
||||
["a", "b", "c", "d", "e"],
|
||||
["f", "g", "h", "i", "k"],
|
||||
["l", "m", "n", "o", "p"],
|
||||
["q", "r", "s", "t", "u"],
|
||||
["v", "w", "x", "y", "z"],
|
||||
]
|
||||
self.SQUARE = np.array(SQUARE)
|
||||
|
||||
def letter_to_numbers(self, letter: str) -> np.ndarray:
|
||||
|
Reference in New Issue
Block a user