title: Count the uppercase letters in a string with Python
body: <p>I am trying to figure out how I can count the uppercase letters in a string.  </p>
  
  <p>I have only been able to count lowercase letters:</p>
  
  <pre><code>def n_lower_chars(string):
      return sum(map(str.islower, string))
  </code></pre>
  
  <p>Example of what I am trying to accomplish:</p>
  
  <pre><code>Type word: HeLLo                                        
  Capital Letters: 3
  </code></pre>
  
  <p>When I try to flip the function above, It produces errors:</p>
  
  <pre><code>def n_upper_chars(string):
      return sum(map(str.isupper, string))
  </code></pre>