Sep-04-2020, 02:18 PM
Hi,
Brand new to Python and this my first question on the forum (please be gentle
)
I have defined a dictionary with separate keys and values as lists, shown below;
When i print the contents of the dictionary in "JupyterLab" the output is then returned in the following format;
When i do the same using "Spyder" the output is returned with each keys contents list on the same line, as shown below;
How do i get "JupyterLab" to output the contents of the dictionary the same format as "Spyder" does, all on a single line? Or at least each keys list completely on each keys line.
Must be a setting in "JupyterLabs" perhaphs?
Many thanks for taking your time, any help is really appreciated.
Brand new to Python and this my first question on the forum (please be gentle

I have defined a dictionary with separate keys and values as lists, shown below;
1 2 3 4 5 |
people = { "first" : [ "Corey" , "Jane" , "John" ], "last" : [ "Shafer" , "Doe" , "Millard" ], "email" :[ "CoreyMSchafer@gmail.com" , "JaneDoe@email.com" , "JohnM81@hotmail.com" ] } |
1 2 3 4 5 |
{ 'first' : [ 'Corey' , 'Jane' , 'John' ], 'last' : [ 'Shafer' , 'Doe' , 'Millard' ], 'email' : [ 'CoreyMSchafer@gmail.com' , 'JaneDoe@email.com' , 'JohnM81@hotmail.com' ]} |
1 |
{ 'first' : [ 'Corey' , 'Jane' , 'John' ], 'last' : [ 'Shafer' , 'Doe' , 'Millard' ], 'email' : [ 'CoreyMSchafer@gmail.com' , 'JaneDoe@email.com' , 'JohnM81@hotmail.com' ]} |
Must be a setting in "JupyterLabs" perhaphs?
Many thanks for taking your time, any help is really appreciated.