title: Most pythonic way to write a function to either pass in arguments or a tuple of arguments
body: <p>What is a most pythonic way to write a function to either pass in arguments or a tuple/list of arguments?</p>
  
  <p>For example, a function <code>add</code> could either take in an argument of <code>add(1, 2)</code> or <code>add((1, 2))</code> and both output <code>3</code>.</p>
  
  <p>What I have so far: (it works, but does not look nice)</p>
  
  <pre><code>def add(*args):
      if len(args) == 1:
          return (args[0][0] + args[0][1])
      if len(args) == 2:
          return args[0] + args[1]
      else:
          print "error: add takes in one or two arguments"
  </code></pre>
  
  <p>What I don't like about it is:</p>
  
  <ol>
  <li>I have to print the error about passing in one or two arguments</li>
  <li>The <code>args[0][0]</code> looks very unreadable</li>
  <li>This way, it is hard to tell what the arguments passed in represent (they don't have names)</li>
  </ol>