Veeva Systems interview question

String manipulation question for python programming