如何用python讀取json文件里指定的數據?
import jsonwith open('who.json', 'r') as f: data = json.load(f) dependencies = data['dependencies'] for k, v in dependencies.iteritems(): print(f'{k}@{v}')
如何用python讀取json文件里指定的數據?
import jsonwith open('who.json', 'r') as f: data = json.load(f) dependencies = data['dependencies'] for k, v in dependencies.iteritems(): print(f'{k}@{v}')