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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!