Python - Structured Data Files
Identify the error in this code snippet that tries to read JSON data from a file:
import json
f = open('data.json', 'r')
data = json.load(f)
f.close()
print(data)Identify the error in this code snippet that tries to read JSON data from a file:
import json
f = open('data.json', 'r')
data = json.load(f)
f.close()
print(data)15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions