Python split dictionary key at comma
<p>I have a dictionary called muncounty- the keys are municipality, county. separted by a comma and the value is a zip code </p>

<pre><code> muncounty['mun'+','+'county'] = 12345
</code></pre>

<p>My goal is to split the keys at the comma separating the mun and county and only extract the mun.</p>

<p>I have tried </p>

<pre><code>muncounty.keys().split(',')
</code></pre>

<ul>
<li>i know this does not work because you cannot use the split function on a list</li>
</ul>