代码示例:(标识:python_dictionary_nested_1)
python_dictionary_nested_1.py
myfamily = {
  "child1" : {
    "name" : "Phoebe Adele",
    "year" : 2002
  },
  "child2" : {
    "name" : "Jennifer Katharine",
    "year" : 1996
  },
  "child3" : {
    "name" : "Rory John",
    "year" : 1999
  }
}

print(myfamily)
运行结果: