...snippet... # all import and other processing scriptcode here...
x = matrix1
y = matrix2
count1 = 0 # matrix 1
count2 = 0 # matrix 2
count_dbl = 0 # summary of encountered doubles within both matrixes
for item1 in x:
count1 +=1
for item2 in y:
count2 += 1
if item1 == item2:
..do whatever you need to do here...
count_dbl+=1
else:
... do something else here...
pass
print ('validation check on items in matrix 1: %s - 2: %s. Doubles: %s' % (count1, count2, count_dbl)
由于OP没有提供所用的完整脚本代码,我只能提供与矩阵(数据库、列表等)相关的一般答案
提示:item1或item2可以是处理来自xml或excel文件等的readline信息的方法
享受;p
相关问题 更多 >
编程相关推荐