DiacriTech Interview Question

String manipulation and problem solving in python