> Is there anyway to print informtation from dictionaries better than this?:
For formatted printing look at the print format operator '%' You can specify field sizes, justification etc thus : >>> pairs = {"Jon Moore": "Tony Moore", "Simon Nightingale": "John Nightingale", "David Willett": "Bernard Willet", "John Jackson": "Stuart Jackson", "James Southey": "Richard Southey", "William Forsythe": "Shaun Forsythe"} >>> print pairs.keys() ['David Willett', 'Jon Moore', 'John Jackson', 'Simon Nightingale', 'James Southey', 'William Forsythe'] >>> for father,son in pairs.items: ... print "%20s\t%20s" % (father,son) Which will print father and son each in a field 20 characters wide with a tab between them. The docs on the format operator are here: http://docs.python.org/lib/typesseq-strings.html HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor