title: Python - unpacking kwargs in local function call
body: <p>I would like to pass a <code>dictionary</code>:</p>
  
  <pre><code>items = {"artist": "Radiohead", "track": "Karma Police"}
  </code></pre>
  
  <p>as a parameter to this <code>function</code>:</p>
  
  <pre><code>def lastfm_similar_tracks(**kwargs):
  
      result = last.get_track(kwargs)
      st = dict(str(item[0]).split(" - ") for item in result.get_similar())
      print (st)
  </code></pre>
  
  <p>where <code>last.get_track("Radiohead", "Karma Police")</code> is the correct way of calling the local <code>function</code>.</p>
  
  <p>and then call it like this:</p>
  
  <pre><code>lastfm_similar_tracks(items)
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <p><code>TypeError: lastfm_similar_tracks() takes exactly 0 arguments (1 given)</code></p>
  
  <p>how should I correct this?</p>