the numbers

This commit is contained in:
Maxime Vorwerk
2024-06-13 16:42:24 +02:00
parent 4196849359
commit 96aa5ec4a1

13
the_numbers/sol.py Executable file
View File

@@ -0,0 +1,13 @@
#!/home/maxime/.pyvenv/bin/python3
def int2chr(a):
a = a.strip()
if a in "{}":
return a
else:
return chr(int(a) + ord('a') - 1)
with open("numbers", 'r') as f:
digits = f.read().split(' ')
print(''.join(map(int2chr, digits)))