title: Python tuple ... is not a tuple? What does the comma do?
body: <p>I was looking at code in my course material and had to write a function which adds the value 99 to either a <code>list</code> or <code>tuple</code>. The final code looks like this:</p>
  
  <pre><code>def f(l):
      print(l)
      l += 99,
      print(l)
  
  f([1,2,3])
  f((1,2,3))
  </code></pre>
  
  <p>This was used to show something different but I'm getting somewhat hung up on the line <code>l += 99,</code>. What this does, is create an iterable that contains the 99 and <code>list</code> as well as <code>tuple</code> support the simple "addition" of such an object to create a new instance/add a new element.</p>
  
  <p>What I don't really get is what exactly is created using the syntax <code>element,</code>? If I do an assignment like <code>x = 99,</code> the <code>type(x)</code> will be <code>tuple</code> but if I try run <code>x = tuple(99)</code> it will fail as the 99 is not iterable. So is there:</p>
  
  <ul>
  <li>Some kind of intermediate iterable object created using the syntax <code>element,</code>?</li>
  <li>Is there a special function defined that would allow the calling of <code>tuple</code> without an iterable and somehow <code>,</code> is mapped to that?</li>
  </ul>
  
  <p>Edit:
  In case anyone wonders why the accepted answer is the one it is: The explanation for my second question made it. I should've been more clear with my question but that <code>+=</code> is what actuallly got me confused and this answer includes information on this. </p>