Python 2.7: Print a dictionary without brackets and quotation marks
<pre><code>myDict = {"Harambe" : "Gorilla", "Restaurant" : "Place", "Codeacademy" : "Place to learn"}
</code></pre>

<p>So, I want to print out a dictionary. But I want to do it like it looks like an actual list of things. I can't just do <code>print myDict</code>, as it will leave all the ugly stuff in. I want the output to look like <code>Harambe : Gorilla, Restaurant : Place, etc</code></p>

<p>So what do I do? I haven't found a post meeting what I want. Thanks in advance.</p>

<p>Using the <code>items</code> dictionary method:</p>

<pre><code>print('\n'.join("{}: {}".format(k, v) for k, v in myDict.items()))
</code></pre>

<p>Output: </p>

<pre><code>Restaurant: Place
Codeacademy: Place to learn
Harambe: Gorilla
</code></pre>

<p>Expanded: </p>

<pre><code>for key, value in myDict.items():
    print("{}: {}".format(key, value))
</code></pre>

python python-2.7 dictionary printing