我不确定它是pythonic的
from itertools import takewhile,izipx = [[3,2,1], [3,2,1,4,5], [3,2,1,8,9], [3,2,1,5,7,8,9]]def allsame(x): return len(set(x)) == 1r = [i[0] for i in takewhile(allsame ,izip(*x))]

我不确定它是pythonic的
from itertools import takewhile,izipx = [[3,2,1], [3,2,1,4,5], [3,2,1,8,9], [3,2,1,5,7,8,9]]def allsame(x): return len(set(x)) == 1r = [i[0] for i in takewhile(allsame ,izip(*x))]