Python - Structured Data Files
The following code throws an error. What is the mistake?
import json
data = {'x': 1, 'y': 2}
print(json.dumps(data, indent=2.0))import json
data = {'x': 1, 'y': 2}
print(json.dumps(data, indent=2.0))indent parameter is given as a float 2.0 instead of an integer 2.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions