Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01a6672

Browse files
author
Amogh Singhal
authored
Update Python_Programming_Quiz.md
1 parent 9c67b40 commit 01a6672

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎Python_Programming_Quiz.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,13 @@ A Thread is defined in computer science as the smallest unit that can be schedul
117117
- A running thread that is done executing terminates and is in the dead state
118118

119119
![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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /