Python Challenge - Level 30


The picture is only meant to help you relax


$ wget --user repeat --password switch

from PIL import Image
import math

with open('yankeedoodle.csv') as f:
    data = [x.strip() for x in",")]
    length = len(data)
    # 7367

    factors = [x for x in range(2, length) if length % x == 0]
    # [53, 139]

    img ="F", (53, 139))
    img.putdata([float(x) for x in data], 256)

    img = img.transpose(Image.FLIP_LEFT_RIGHT)
    img = img.transpose(Image.ROTATE_90)
    a = data[0::3]
    b = data[1::3]
    c = data[2::3]

    res = bytes([int(x[0][5] + x[1][5] + x[2][6]) for x in zip(data[0::3], data[1::3], data[2::3])])

b'So, you found the hidden message.\nThere is lots of room here for a long message, but we only need very little space to say "look at grandpa", so the rest is just garbage. \nVTZ.l\'\x7ftf*[email protected]"p]...'

keyword: grandpa

Next Level