Pergunta de entrevista da empresa 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?