Ver originalA = ["jp?","test"]B = ["jpeg","cd","tex","jpg","test"] coincidencia = []for b in B: for a in A: # PROCESAR COSAS # ... if (ALGUNA_CONDICION): coincidencia.append(b) break