def search_python_list(python_code, template_names):
 retval = []
 for tn in template_names:
  retval.extend(search_python(python_code, tn))
 retval = list(set(retval))
 retval.sort()
 return retval

def search_python_list ( python_code , template_names ) : retval = [ ] for tn in template_names : retval . extend ( search_python ( python_code , tn ) ) retval = list ( set ( retval ) ) retval . sort ( ) return retval
searches python code for a list of template names .