Pregunta de entrevista de Walmart Global Tech

Two sum target One dictionary coding question. Basic python theory concepts