thanks i was not able to figure it out some days before but now i think i can do it myself: a nice function that searches a string in a list. def parsesb(lis, string): print lis for num, nam in enumerate (lis): print num, nam if type(nam) == list: parsesb(lis[num],string) if type(nam) == str: # do something if nam == string: print 'hit!!!'