Gap Inc. interview question

Basic string manipulation questions in Python