Example python solution for predictive text.