1class LockPicker_7MI8000058:
2 def __init__(self, lock):
3 self.lock = lock
4
5 def unlock(self):
6 password = []
7 while True:
8 try:
9 if self.lock.pick(*password):
10 break
11 except Exception as ex:
12 if ex.position is None:
13 password = [None] * ex.expected
14 elif isinstance(ex.position, int) and isinstance(ex.expected, type):
15 password[ex.position - 1] = ex.expected()
16 else:
17 password[ex.position - 1] = ex.expected
Резултат от контролното:
18/25 верни отговора.
15 точки.
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK