[Tutor] How to get the keys of a dict inside a dict. ValueError: too many values to unpack

Prasad, Ramit ramit.prasad at jpmorgan.com
Mon Aug 8 17:48:18 CEST 2011


>I would suggest using the string format() method to lay out the columns 
>as you want them.  You could use tab, but if your data values vary much, 
>you'll get inconsistent results (i.e., if one row's value goes past the 
>next tab stop).  You'll want to create your own for loop to iterate over 
>the (possibly sorted) list of values, printing each row the way you want it.

+1

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  


More information about the Tutor mailing list