@@ -117,3 +117,13 @@ A Thread is defined in computer science as the smallest unit that can be schedul
117
117
- A running thread that is done executing terminates and is in the dead state
118
118
119
119
![ Life cycle of a thread] ( https://www.tutorialspoint.com/java/images/Thread_Life_Cycle.jpg )
120
+
121
+ #### 7. What is the ` dict() ` data structure in Python ? <br >
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
+ A pair of braces creates an empty dictionary. Something like this <br >
124
+ ` empty_dic = {} ` <br >
125
+ Placing a comma-separated list of key: value pairs within the braces adds initial key: value pairs to the dictionary <br >
126
+ ` student = {'name': "Narendra", 'class': "Junior", 'dob': "2002年01月03日"} ` <br >
127
+ Dictionaries are sometimes found in other languages as __ associative memories__ or __ associative arrays__ . <br >
128
+ Unlike sequences, which are indexed by a range of numbers, dictionaries are indexed by __ keys__ , which can be any __ immutable type__ <br >
129
+ ` strings ` and ` numbers ` can always be keys
0 commit comments