Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Stressful Subject by NyashniyVladya
import re
stressful_words = ("help", "asap", "urgent")
def is_stressful(text: str) -> bool:
if text.isupper() or text.endswith("!!!"):
return True
flags = re.IGNORECASE | re.DOTALL
for word in stressful_words:
if re.search("{0}+".format("+\\W*".join(word)), text, flags):
return True
return False
Dec. 24, 2018