Pregunta de entrevista de Meta

code Q in Python - given two files with different into how to extract only lines with specific info and how to make it most efficient?