title: Another way to think about the * operator/splat?
body: <p>I couldn't find anything explaining this operator in a way I've seen it used, so I just wanted to make sure I understand it correctly and help those like myself who aren't programming wizards.</p>
  
  <p>Consider that we can write</p>
  
  <p><code>tree.delete(*tree.get_children())</code></p>
  
  <p>and </p>
  
  <pre><code>for i in tree.get_children():
      tree.delete(i)
  </code></pre>
  
  <p>to do the same thing. In this case, it seems like <code>tree.delete</code> has been programmed to accept an argument of arbitrary length to accomplish the same thing as a for loop. Is this popular to do? Is this kosher to do? </p>
  
  <p><code>edit:</code> here is my solution to what I meant to answer for the first part</p>
  
  <pre><code>def func(*numbers):
      return list(map(lambda x: x + 1, numbers))
  
  
  old = [1,2,3]
  new = []
  
  for i in old:
      new.append(i + 1)
  
  print(func(*old) == new)
  </code></pre>
  
  <p><code>for</code> loop and <code>func</code> are equivalent here, but is there a reason why we might prefer one over the other?</p>