-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path29-guido.py
More file actions
19 lines (13 loc) · 644 Bytes
/
Copy path29-guido.py
File metadata and controls
19 lines (13 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Python Challenge Solutions
# https://github.com/scorphus/PythonChallengeSolutions
# Licensed under the BSD-3-Clause license:
# https://opensource.org/licenses/BSD-3-Clause
# Copyright (c) 2018-2020, Pablo S. Blum de Aguiar <scorphus@gmail.com>
# http://www.pythonchallenge.com/pc/ring/guido.html
from auth import read_riddle
from bz2 import decompress
riddle = read_riddle("http://www.pythonchallenge.com/pc/ring/guido.html")
data = bytes(len(line) for line in riddle.splitlines() if "<" not in line)
print(decompress(data).decode().rstrip("!").rsplit(maxsplit=1)[-1])