Pregunta de entrevista de Lowe's Home Improvement

Python codeing question based on list.