well i just found out that if the longest row is in the end of the list it doesn't count it. i'm thinking of adding another "if" after "for" finishes its work. maybe there's some better way to do it but i didn't fid it out yet.

FWIW, a more generic solution using a list to keep track of the maximum's value and the number of times it occurs.

def find_the_max(blist):
## a list containing the value and the number of times it appears
max_group = [blist[0], 0]
this_group = [blist[0], 0]
for el in blist:
if el == this_group[0] :
this_group[1] += 1
else:
## test for a new max
if this_group[1] > max_group[1]:
max_group = this_group[:]
this_group = [el, 1]
## allow for the final group to be the longest
if this_group[1] > max_group[1]:
max_group = this_group[:]
print max_group
blist = [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1]
find_the_max(blist)
clist = [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2]
find_the_max(clist)

Hello!
My question is how to code search in combobox each time typeing a letter. And the search result in DropDown have to show list items which contains letter or ...