for in range len Alfa for in range len Betta countt res1 res2 for in r

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
for i in range(0, len(Alfa)):
for l in range(0, len(Betta)):
countt = 0
res1 = 0
res2 = 0
for j in range(0, len(Vh)):
if str(tab_number) == '1':
Vi = (TabS1[Vh[j]])
elif str(tab_number) == '2':
Vi = (TabS2[Vh[j]])
else:
break
temp1 = Vh[j] & Alfa[i]
temp2 = Vi & Betta[l]
print 'temp1', temp1, 'temp2', temp2
for k in range(0, 4):
if (temp1 >> k)&1 != 0:
temp1 = temp1 >> k
res1 = res1 ^ (temp1 & 1)
for k in range(0, 3):
if temp2 >> k != 0:
temp2 = temp2 >> k
res2 = res2 ^ (temp2 & 1)
print 'res1', res1, 'res2', res2
if res1 ^ res2 == 0:
countt = countt + 1