title: Why would we use * (asterisk) as an argument in a python function instead of passing a list?
body: <p>My understanding is that <code>*args</code> can be used to allow an arbitrary number of inputs in a Python function. For example, the function</p>
  <pre><code>def f(*x):
      for v in x:
        print(v)
  </code></pre>
  <p>could be called as</p>
  <pre><code>f(1)
  # or
  f(1, 2, 3)
  </code></pre>
  <p>However, it seems to me that this is equivalent to defining a function that takes a list of values as an argument. For example, we could define the same function as</p>
  <pre><code>def f(x):
      for v in x:
        print(v)
  </code></pre>
  <p>and call it as</p>
  <pre><code>f([1])
  # or
  f([1, 2, 3])
  </code></pre>
  <p>and this would result in the same behavior.</p>
  <p>Given this, why should we use the <code>*</code> pattern in defining functions instead of passing lists? Is it more &quot;correct&quot;? Faster? More secure? Or are there use cases where only the <code>*</code> pattern achieves the desired outcome?</p>