How to print a list in Python "nicely"
Question: In PHP, I can do this:

    
    
    echo '<pre>'
    print_r($array);
    echo '</pre>'
    

In Python, I currently just do this:

    
    
    print the_list
    

However, this will cause a big jumbo of data. Is there any way to print it
nicely into a readable tree? (with indents)?


Answer: 
    from pprint import pprint
    pprint(the_list)
    

