def findline(lines, start):
 for i in range(len(lines)):
  if (lines[i][:len(start)] == start):
   return i
 return (-1)

def findline ( lines , start ) : for i in range ( len ( lines ) ) : if ( lines [ i ] [ : len ( start ) ] == start ) : return i return ( - 1 )
return line starting with given string or -1 .