StoneX interview question

Q: List and string manipulation