Ad

Simplified

Code
Diff
  • def AmIYelling(input_sentence):
        return all([ x.isupper() for x in input_sentence if x.isalpha() ])
    • def AmIYelling(input_sentence):
    • return len([l for l in input_sentence if ((l.isalpha() and l.isupper())or not l.isalpha())]) == len(input_sentence)
    • return all([ x.isupper() for x in input_sentence if x.isalpha() ])