More Pythonic string search