, " " (.. ), "0" "1".
, 1 2,
row = [thestring[i:i+3] for i in xrange(0, len(thestring), 3)]
, 1 2 , len(thestring) 3, ; -).
3 4 temp :
aux = {}
for x in range(8):
s = format(x, 'b')
aux[s] = x
aux[('00'+s)[-3:]] = x
3 4 :
numbers = [aux[x] for x in row]
dict , .
: , aux x. , s 1 3 , : s ( , row 3...), 3 0 s.
('00'+s)[-3:] "" "0 3", 3 ( [-3:]), of s ( '00'+s). s 3 , s, aux , , , ( if len(s)<3: , ; -).
(, x, ), ( 8 " ", ;-), .
... , . ...?
, row '01' : THAT- , aux, aux ( 1 001 , ;-). s, '1' , '001', - , oops, -).
, ...:
aux = {}
for x in range(8):
s = format(x, 'b')
aux[s] = x
while len(s) < 3:
s = '0' + s
aux[s] = x
... , , , , ; -).