Skip to content
Advertisement

Print key value pairs from a dictionary

I want to pretty-print the key-value pairs of a dictionary. I have the following code:

JavaScript

This is what my code currently produces:

JavaScript

But I want:

JavaScript

How do I make this happen?

Advertisement

Answer

Consider using len() to balance out the number of dots

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement