MathCo interview question

they asked about strings in python