Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Stressful Subject by tokiojapan55
def is_stressful(subj):
if len(subj) >= 3 and subj[-3:] == "!!!":
return True
if subj.upper() == subj:
return True
subj = "".join([c.lower() for c in subj if c.isalpha()])
phrase = ""
while len(subj) > 0:
c = subj[0]
while len(subj) > 0 and subj[0] == c:
subj = subj[1:]
phrase += c
for word in ["help", "asap", "urgent"]:
if phrase.find(word) >= 0:
return True
return False
May 17, 2023
Comments: