2019-02-23
閱讀量:
739
python如何讀取json 文件?
python如何讀取json 文件?
答:
首先創(chuàng)建json文件
{
"name":"angle",
"age":"19"
}
然后加載數(shù)據(jù)并返回
def loadJson():
f = open("json.json")
setting = json.load(f)
f.close()
age = setting['age']
name = setting['name']
return name + age
a,b = loadJson()






評論(0)


暫無數(shù)據(jù)
CDA考試動態(tài)
CDA報(bào)考指南
推薦帖子
0條評論
0條評論
0條評論
0條評論