Rover.com interview question

Short string manipulation interview in Python, it is easy for people with medium level of Python