Pergunta de entrevista da empresa Alibaba Group

String problem in LeetCode. Some basic list operation in Python should suffice.