Answers for "prettyprint python"

1

python pretty print

import pprint

student_dict = {'Name': 'Tusar', 'Class': 'XII', 
     'Address': {'FLAT ':1308, 'BLOCK ':'A', 'LANE ':2, 'CITY ': 'HYD'}}

print student_dict
print "n"
print "***With Pretty Print***"
print "-----------------------"
pprint.pprint(student_dict,width=-1)
Posted by: Guest on December-08-2020
0

pretty print list python

from pprint import pprint
pprint(the_list)
Posted by: Guest on May-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language