TDT4109/Exercise 4 - Inspera/12.py

4 lines
79 B
Python

import re
def correct_word(string):
return bool(re.match('^\w+$', string))