Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Stressful Subject by Ordik
import re
def is_stressful(subj):
cond1 = subj.isupper() or subj[::-1].find('!!!') == 0
subj = subj.lower()
cond2 = bool(re.search(r'h+[\W]*e+[\W]*l+[\W]*p+[\W]*', subj))
cond3 = bool(re.search(r'a+[\W]*s+[\W]*a+[\W]*p+[\W]*', subj))
cond4 = bool(re.search(r'u+[\W]*r+[\W]*g+[\W]*e+[\W]*n+[\W]*t+[\W]*', subj))
return cond1 or cond2 or cond3 or cond4
Nov. 17, 2020
Comments: