Pretty prints a Python object using pprint.pprint wrapper.
Variable
context['classes'] = {
'Python': [
'Introduction to Python Training', 'Advanced Python Training',
'Data Science Training', 'Django Training'
],
'Databases': [
'Introduction to PostgreSQL Training', 'Introduction to MySQL Training',
'Introduction to SQL Server Training', 'Introduction to Oracle Training'
],
'Web': [
'HTML Training', 'CSS Training', 'JavaScript Training'
],
'XML': [
'Introduction to XML Training'
]
}
Template
<pre>{{ classes|pprint }}</pre>
Result
{'Databases': ['Introduction to PostgreSQL Training',
'Introduction to MySQL Training',
'Introduction to SQL Server Training',
'Introduction to Oracle Training'],
'Python': ['Introduction to Python Training',
'Advanced Python Training',
'Data Science Training',
'Django Training'],
'Web': ['HTML Training', 'CSS Training', 'JavaScript Training'],
'XML': ['Introduction to XML Training']}

Commentary
Could be useful for debugging, though you can do the same thing at the console.