title: Python: Pretty Print in Jupyter Notebook
body: <p>I am trying to pretty print a dict in Jupyter Notebook.</p>
  
  <p>I am using the following:</p>
  
  <pre><code>import pprint
  stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
  stuff.insert(0, stuff[:])
  pp = pprint.PrettyPrinter(indent=4)
  pp.pprint(stuff)
  </code></pre>
  
  <p>However upon pressing shift+enter, no <code>[out]</code> cell appear (i.e. I can't see the pretty printed output)</p>
  
  <p><a href="https://i.stack.imgur.com/leJ7C.png" rel="noreferrer"><img src="https://i.stack.imgur.com/leJ7C.png" alt="enter image description here"></a></p>
  
  <p>Any idea why this is so/ what should I change in order to see the pretty printed output?</p>
  
  <hr>
  
  <p>Edit: Actually this is a python 2.7 problem - it works fine in 3.x.
  Have anyone tried it on python 2.7 and seen it work?</p>