> for i in range(len(a)): > for k in range(len(a)): for k in range(i,len(a)): is faster, and if you calculate len before starting the loops that will speed it up too. (You calculate len for each iteration of each loop!) > if i != k: > if a[i] == a[k]: > print a[i] > break HTH Alan G.