Dictionary Quiz

 

Python Dictionary Quiz

🧠 Python Dictionary Data Type – Quiz

1. What is a dictionary in Python?

2. Which symbol is used to create a dictionary?

3. Keys in a Python dictionary must be:

4. How to access value of key “name” from dictionary d?

5. Which method removes a specific key from a dictionary?

6. Which method returns all keys of a dictionary?

7. What is the output of len({"a":1, "b":2, "c":3})?

8. Which method is used to combine two dictionaries?

9. What will be printed?
d = {"x":1}; print(d.get("y",0))

10. Which of the following deletes all elements from a dictionary?

Comments

Popular posts from this blog

Topic1 :- What is Python Programming?

Topic2: -Why Python?

Topic7: What is Numpy?