AstraZeneca interview question

String manipulation in Python with index