-2
我要動態地創建動態密鑰和值的
在這個字典詞典我需要把另一個字典,像這樣
例
{"Key Name of file" : "Value Name",
"Specs" : [{"spec1" : "round", "spec2" : "large", "spec3": "pink"}]}
我該如何做到這一點?
下面的代碼無法正常工作
save = {}
save['Key name of file'] = 'Value Name'
save['specs'] = []
save['specs'].append([{'spec1', 'spec2', 'spec3'}])
save['specs'][0] = 'round'
save['specs']['spec2'] = 'large'
dictionay有一對關鍵和價值,你做錯了 – Hackaholic 2014-12-13 09:43:43