This is the dictionary
cars = {\'A\':{\'speed\':70, \'color\':2}, \'B\':{\'speed\':60, \'color\':3}}
Using this
pprint.pprint() is a good tool for this job:
>>> import pprint >>> cars = {'A':{'speed':70, ... 'color':2}, ... 'B':{'speed':60, ... 'color':3}} >>> pprint.pprint(cars, width=1) {'A': {'color': 2, 'speed': 70}, 'B': {'color': 3, 'speed': 60}}