# python的字典与PHP的关系数组,和JS中的JSON格式是一样的
## 字典 键值对的KEY和value可以是任意类型{key不可为字典}
##
## 字典内key不允许重复,重复添加等同于夫覆盖原有的数据
## 语法:
~~~
my_dict1={
"王力宏":{"语文":77,"数学":66,"英语":33},
"周杰伦":{"语文":88,"数学":86,"英语":55},
"林俊杰":{"语文":99,"数学":96,"英语":66}
}
print(my_dict1["王力宏"])
~~~
# 字典遍历
~~~
a={"a":"1","b":2,"c":3,"v":4}
for i in a: #循环遍历字典,I 为字典的K
print(a[i]) #取出字典中的V值
~~~