Hello,
This is my first post on this platform, and I'd like to leave a puzzle. Code below!
Cheers,
Matt
Code:
from itertools import chain, cycle
from functools import reduce
import base64
encoded = 'SSBhbSBuZXcgaGVyZSwgYW5kIGxvb2tpbmcgZm9yd2FyZCB0byBwb3N0aW5n'
decoded = base64.b64decode(encoded).decode('utf-8')
indices = chain.from_iterable(
[reduce(lambda x, y: x + y, [[i] for i in range(len(decoded))][::j]) for j in range(1, 2)]
)
unscrambled = ''.join(decoded[i] for i in indices if i < len(decoded))
vars()[decoded[:3]] = unscrambled
(lambda x: print(x))(reduce(lambda a, b: a + b, cycle([decoded])))
Top comments (0)