Question: str methods: upper or lower To answer this question, search through Python documentation of str for methods that could be useful in your solution. Complete
str methods: upper or lower
To answer this question, search through Python documentation of str for methods that could be useful in your solution. Complete this function according to its docstring description.
def upper_lower(text: str) -> bool: """Return True if and only if there is at least one alphabetic character in text and the alphabetic characters in text are either all uppercase or all lowercase.
>>> upper_lower('abc')
True
>>> upper_lower('abcXYZ')
False
>>> upper_lower('XYZ')
True
"""
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
