Local search in Python 3.x