From 6f32f826ccfd10ae01b735b6f70aa868f1be3455 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Sun, 14 Apr 2019 08:48:34 +0800 Subject: We can have nested dictionaries, a dictionary as value in another dictionary. --- LectureNotesOnPython.rst | 5 +++++ 1 file changed, 5 insertions(+) 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'} } 函数 -- cgit v1.2.1