• ALL UPPER : diffulty with Mixed

Question related to mission All Upper I

 

hello i think my code is ok, except with the Mixed text (upper and lower)

here my code: def isallupper(text: str) -> bool: if text.isupper()== False: if text.islower(): return False elif text == '': return True elif text is not str: return True else: return False if text.upper().isupper(): return True

return False

and the resultat : Example:

True

AssertionError:

<module>, 30 = assertion Mixed

i thought that "else" could manage the over exceptions that i have not specifed : BUT Not !! have you got a suggestion for me , please ? thank you