summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2019-04-14 08:48:34 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2019-04-14 08:48:34 +0800
commit6f32f826ccfd10ae01b735b6f70aa868f1be3455 (patch)
tree17b91e1196b3de6ecbe08a85a6a18267be1997a3
parent7f47b672c873a5ef5ee0c86dfb80c26e796ccf31 (diff)
We can have nested dictionaries, a dictionary as value in another dictionary.
-rw-r--r--LectureNotesOnPython.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/LectureNotesOnPython.rst b/LectureNotesOnPython.rst
index e923444..eb36053 100644
--- a/LectureNotesOnPython.rst
+++ b/LectureNotesOnPython.rst
@@ -931,6 +931,11 @@ key与value互换
return d2
+字典里面可以有字典
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code:: python
+ d = { 'john':{'dob':'1990-10-23', 'height':'6 feet 5 inches'} }
函数