What does json.dumps(obj, indent=2) do in Python?
Correct answer
D. Pretty-prints JSON with 2-space indentation
8 views
D. Pretty-prints JSON with 2-space indentation
8 views
The indent parameter formats output for readability.
Asked in: Python Interview Standard Library
https://docs.python.org/3/library/index.htmlNot sure why the answer is D? Ask here and get an explanation.