title: Getting first and last function parameter in Python
body: <p>I have to make a function with more than 2 arguments in python and in the end I have to print the first and the last argument of the function (in a list).</p>
  
  <p>I have tried like this, but it doesn't work. What am i doing wrong?</p>
  
  <pre><code>import inspect
  
  def func(a, b, c):
      frame = inspect.currentframe()
      args, _, _, values = inspect.getargvalues(frame)
      for i in args:
          return [(i, values[i]) for i=0 and i=n]
  </code></pre>