Answer the question
In order to leave comments, you need to log in
How to get data from JSON using Python?
There is JSON:
{
"A": {
"B": D,
"C": [1, 2, 3, ...]
}
}
We need to get the list [1,2,3...] from it using Python .
Answer the question
In order to leave comments, you need to log in
import json
with open('file.json', 'r') as f:
c = json.load(f)['a']['c']
print(c)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question