Thought Machine interview question

To write up a search in string algorithm on the whiteboard in python-esque script