From 72bedd992e9fb0c8bb4faa639f11484408e07571 Mon Sep 17 00:00:00 2001 From: lucky-vers Date: Tue, 14 Nov 2023 02:55:27 +0530 Subject: [PATCH] Refactor some really bad code --- Phase 2/05 Cryptography.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Phase 2/05 Cryptography.md b/Phase 2/05 Cryptography.md index 24e7a59..01be510 100644 --- a/Phase 2/05 Cryptography.md +++ b/Phase 2/05 Cryptography.md @@ -140,10 +140,7 @@ import string x = [350, 63, 353, 198, 114, 369, 346, 184, 202, 322, 94, 235, 114, 110, 185, 188, 225, 212, 366, 374, 261, 213] # Contents of `message.txt` converted to an array -keys = [] - -for i in string.ascii_uppercase + string.digits + '_': - keys.append(i) +keys = [i for i in string.ascii_uppercase + string.digits + '_'] for i in x: print(keys[i % 37])