@@ -120,10 +120,13 @@ A Thread is defined in computer science as the smallest unit that can be schedul
120
120
121
121
#### 7. What is the ` dict() ` data structure in Python ? <br >
122
122
It is best to think of a dictionary as a __ set of key: value pairs__ , with the requirement that the __ keys are unique (within one dictionary)__ . <br >
123
+
123
124
A pair of braces creates an empty dictionary. Something like this <br >
124
125
` empty_dic = {} ` <br >
126
+
125
127
Placing a comma-separated list of key: value pairs within the braces adds initial key: value pairs to the dictionary <br >
126
128
` student = {'name': "Narendra", 'class': "Junior", 'dob': "2002年01月03日"} ` <br >
129
+
127
130
Dictionaries are sometimes found in other languages as __ associative memories__ or __ associative arrays__ . <br >
128
131
Unlike sequences, which are indexed by a range of numbers, dictionaries are indexed by __ keys__ , which can be any __ immutable type__ <br >
129
132
` strings ` and ` numbers ` can always be keys
0 commit comments