title: How to print a dictionary line by line in Python?
body: <p>This is the dictionary</p>
  
  <pre><code>cars = {'A':{'speed':70,
          'color':2},
          'B':{'speed':60,
          'color':3}}
  </code></pre>
  
  <p>Using this <code>for loop</code></p>
  
  <pre><code>for keys,values in cars.items():
      print(keys)
      print(values)
  </code></pre>
  
  <p>It prints the following:</p>
  
  <pre><code>B
  {'color': 3, 'speed': 60}
  A
  {'color': 2, 'speed': 70}
  </code></pre>
  
  <p>But I want the program to print it like this:</p>
  
  <pre><code>B
  color : 3
  speed : 60
  A
  color : 2
  speed : 70
  </code></pre>
  
  <p>I just started learning dictionaries so I'm not sure how to do this.</p>