mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method Updated the code with f-string methods wherever required for a better and cleaner understanding of the code. * Updated files with f-string method * Update rsa_key_generator.py * Update rsa_key_generator.py * Update elgamal_key_generator.py * Update lru_cache.py I don't think this change is efficient but it might tackle the error as the error was due to using long character lines. * Update lru_cache.py * Update lru_cache.py Co-authored-by: cyai <seriesscar@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -129,7 +129,7 @@ def main() -> None:
|
||||
|
||||
message = input("\nEnter message: ")
|
||||
pubkey_filename = "rsa_pubkey.txt"
|
||||
print("Encrypting and writing to %s..." % (filename))
|
||||
print(f"Encrypting and writing to {filename}...")
|
||||
encryptedText = encrypt_and_write_to_file(filename, pubkey_filename, message)
|
||||
|
||||
print("\nEncrypted text:")
|
||||
@ -137,7 +137,7 @@ def main() -> None:
|
||||
|
||||
elif mode == "decrypt":
|
||||
privkey_filename = "rsa_privkey.txt"
|
||||
print("Reading from %s and decrypting..." % (filename))
|
||||
print(f"Reading from {filename} and decrypting...")
|
||||
decrypted_text = read_from_file_and_decrypt(filename, privkey_filename)
|
||||
print("writing decryption to rsa_decryption.txt...")
|
||||
with open("rsa_decryption.txt", "w") as dec:
|
||||
|
Reference in New Issue
Block a user