Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
One line solution in Clear category for Stressful Subject by ZloyAntox
import re
def is_stressful(subj):
return subj.isupper() or subj[-3:]=="!!!" or bool(re.search(r'h+\W*e+\W*l+\W*p+|a+\W*s+\W*a+\W*p+|u+\W*r+\W*g+\W*e+\W*n+\W*t+',subj.lower()))
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert is_stressful("Hi") == False, "First"
assert is_stressful("I neeed HELP") == True, "Second"
print('Done! Go Check it!')
April 14, 2019
Comments: