title: Pretty Print output in a sideways tree format in console window
body: <p>I have a dictionary such as this created using Python.</p>
  
  <pre><code>d = {'a': ['Adam', 'Book', 4], 'b': ['Bill', 'TV', 6, 'Jill', 'Sports', 1, 'Bill', 'Computer', 5], 'c': ['Bill', 'Sports', 3], 'd': ['Quin', 'Computer', 3, 'Adam', 'Computer', 3], 'e': ['Quin', 'TV', 2, 'Quin', 'Book', 5], 'f': ['Adam', 'Computer', 7]}
  </code></pre>
  
  <p>I wanted to print this out in a sideways tree format rather on the console. I've tried pretty print but when the dictionary gets long, it becomes difficult to read. </p>
  
  <p>For example, with this dictionary, it would return:</p>
  
  <pre class="lang-none prettyprint-override"><code>a -&gt; Book -&gt; Adam -&gt; 4
  b -&gt; TV -&gt; Bill -&gt; 6
    -&gt; Sports -&gt; Jill -&gt; 1
    -&gt; Computer -&gt; Bill -&gt; 5
  c -&gt; Sports -&gt; Bill -&gt; 3
  d -&gt; Computer -&gt; Quin -&gt; 3
                -&gt; Adam -&gt; 3
  e -&gt; TV -&gt; Quin -&gt; 2
      Book -&gt; Quin -&gt; 5
  f -&gt; Computer -&gt; Adam -&gt; 7
  </code></pre>
  
  <p>Essentially, the pretty print is organized by the Activity, or the item in second position in the list, then by name and then by the number.</p>
  
  <p>The sample output above is just an example. I tried working with <a href="https://stackoverflow.com/questions/1733311/pretty-print-a-tree">Pretty print a tree</a> but was unable to figure out how to turn that into a sideways format.</p>