Why is def function(str(n)) an invalid syntax? - python
<p>The task is to define a function which adds all the digits of a number. First I have to convert the input (int) into a string. Then I put each string into a list then add them all together. But I can't get past this:</p>

<pre><code>def digit(str(n)):
     # the rest of the code
</code></pre>

<p>without seeing this:</p>

<blockquote>
  <p>SyntaxError: invalid syntax</p>
</blockquote>