Pregunta de entrevista de United Airlines

coding questions related to python strings, list and dictionary.