title: Str in Python's map and sum
body: <p><strong>Why do you need to use the function 'str' in the following code?</strong></p>
  
  <p>I am trying to count the sum of digits in a number.</p>
  
  <p><strong>My code</strong></p>
  
  <pre><code>for i in number:
      sum(map(int, str(i))
  </code></pre>
  
  <p>where <em>number</em> is the following array</p>
  
  <pre><code>[7,79,9]
  </code></pre>
  
  <p>I read my code as follows</p>
  
  <ol>
  <li>loop though the array such that</li>
  <li>count sum of the integer digits</li>
  <li>by getting given digits in a number by <strong>map</strong> increasingly</li>
  <li>such that each object (given number) is converted to String   <strong>// This does not make sense</strong></li>
  </ol>
  
  <p>Manual says this for <em>str</em></p>
  
  <pre><code>Type:           type
  Base Class:     &lt;type 'type'&gt;
  String Form:    &lt;type 'str'&gt;
  Namespace:      Python builtin
  Docstring:
      str(object) -&gt; string
  
      Return a nice string representation of the object.
      If the argument is a string, the return value is the same object.
  </code></pre>