From 85b06232a1decfed6855a6c016053bcc07e8d07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoshua=20Di=CC=81az?= Date: Tue, 20 Oct 2020 12:20:00 -0500 Subject: [PATCH] solution | Add a solution with regex --- src/main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 3f1ef43..ff8d730 100644 --- a/src/main.py +++ b/src/main.py @@ -1,8 +1,16 @@ # Resolve the problem!! - +import re def run(): - # Start coding here + with open('encoded.txt', 'r', encoding='utf-8') as f: + content = f.read() + listMsg = re.findall('[a-z]', content) + secretMessage = '' + + for char in listMsg: + secretMessage += char + + print(secretMessage) if __name__ == '__main__':