Skip to content

Commit df7b182

Browse files
Om-Alvecclauss
andauthored
changed dictionary comprehension variable names to something more compact
Co-authored-by: Christian Clauss <[email protected]>
1 parent 95471d9 commit df7b182

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: ciphers/fractionated_morse_cipher.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def encrypt_fractionated_morse(plaintext: str, key: str) -> str:
118118
padding_length = 3 - (len(morse_code) % 3)
119119
morse_code += "x" * padding_length
120120

121-
fractionated_morse_dict = {
122-
value: key for key, value in zip(key, MORSE_COMBINATIONS)
123-
}
121+
fractionated_morse_dict = {v: k for k, v in zip(key, MORSE_COMBINATIONS)}
124122
fractionated_morse_dict["xxx"] = ""
125123
encrypted_text = "".join(
126124
[

0 commit comments

Comments
 (0)