Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Stressful Subject by rodka81
import itertools
KEYWORDS = ['help', 'asap', 'urgent']
def spelling(word):
w = ''.join(filter(str.isalpha, word))
return ''.join(ch for ch, _ in itertools.groupby(w)).lower()
def is_stressful(subj):
return any(spelling(word) in KEYWORDS for word in subj.split()) or \
subj.isupper() or \
subj[-3:] == "!!!"
Feb. 18, 2019
Comments: