------
## 最终结论
```python
import re

def text_match_word(input_string):
    match = re.search(r'\bpython\.?\s*$', input_string.strip())
    if match:
        return 'Found a match!'
    else:
        return 'Not matched!'
```