Using something like:
pp = pprint.PrettyPrinter(indent=4, width=...).pprint
Current output of pp(my_list)
:
[ 1,
2,
3]
Desired output:
[
1,
2,
3
]
How might this be done?
Using json module.
Ex:
import json
my_list = [1,2,3]
print(json.dumps(my_list, indent=4))
Output:
[
1,
2,
3
]