title: How to add a comma at the end of a dict?
body: <p>I have a dict with a tuple as a key and list of list of float as value:</p>
  <p>input</p>
  <pre><code>{('K', 123): [[34.0, 34.0], [0.92, 1.5]], ('P', 799): [[14.0, 14.0, 14.0, 14.0], [5.6, 16.7, 12.34, 56.7]], ('H', 946): [[14.5, 56.5, 10.0], [0.34, 0.98, 0.78]]}
  </code></pre>
  <p>output</p>
  <pre><code>{('K', 123): 34.0, ('P', 799): 14.0, ('H', 946): 27,}
  </code></pre>
  <p>I have to find the average at key[0] (the answer is the output), however everytime I run my code, I get this</p>
  <pre><code>{('K', 123): 34.0, ('P', 799): 14.0, ('H', 946): 27}
  </code></pre>
  <p>the comma at the very end is missing. Is there a way to add it?</p>
  <p>This is the code I am using:</p>
  <pre><code>def average(whole_thing: dict[tuple[str, int], list[list[float]]]) -&gt; dict[tuple[str, int], float]
  
  empty_dict = {}
  
  for t in whole_thing:
      value = whole_thing[t]
      empty_dict[t] = sum(value[0])/len(value[0])
  return empty_dict
  </code></pre>
  <p>how can I make it so that it adds the comma at the end? I know it is not necessary to have it, but i need it.</p>