I want to make a new line when making list.
I have tried this code in order to make a chart with list.
[[[] for i in range(3)] for i in range(4)]
[[[], [], []], [[], [], []], [[], [], []], [[], [], []]]
But what I want to print out is
[[[], [], []],
[[], [], []],
[[], [], []],
[[], [], []]]
and I have no idea how to add '\n' in this code.. THANK YOU:)
Use pprint
:
>>> from pprint import pprint
>>> pprint([[[] for i in range(3)] for i in range(4)], width=30)
[[[], [], []],
[[], [], []],
[[], [], []],
[[], [], []]]
>>>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With