title: How can I check if a string only contains uppercase or lowercase letters?
body: <p>Return True if and only if there is at least one alphabetic character in s and the alphabetic characters in s are either all uppercase or all lowercase.</p>
  
  <pre><code>def upper_lower(s):
  
     """ (str) -&gt; bool
  
  
  
  &gt;&gt;&gt; upper_lower('abc')
  True
  &gt;&gt;&gt; upper_lower('abcXYZ')
  False
  &gt;&gt;&gt; upper_lower('XYZ')
  True
  """
  </code></pre>