working example

This commit is contained in:
2023-08-24 18:40:32 +02:00
parent f83393b0a7
commit 46ce08588a
9 changed files with 48 additions and 21 deletions

View File

@ -0,0 +1 @@
cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_uJdSftmh}

15
exercises/144/main.py Normal file
View File

@ -0,0 +1,15 @@
def rot13(message):
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
subs = {char: alphabet[(i + 13) % 26] for i, char in enumerate(alphabet)}
return ''.join(list(map(
lambda x: subs[x] if x in subs else x,
message
)))
if __name__ == '__main__':
with open("./exercises/144/inputs/input") as file:
input = file.read()
print(rot13(input))