How to print the long dictionary in to separate lines
test = {'db1': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases ', 'request': 'POST'}], 'db2': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases ', 'request': 'POST'}]}
Expected output
test =
{'db1':[{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases', 'request': 'POST'}],
'db2': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases', 'request': 'POST'}]}
By importing json module is printing is giving the same output as normal print (test)
import json
print (json.dumps(test))