When does dictionary is used instead of a list in python?
Answer / Narendra Singh Selal
A dictionary is used in Python when you need to store data in key-value pairs. It allows you to access values quickly using their corresponding keys, making it ideal for situations where the relationship between elements (i.e., keys and values) is more significant than their order. Examples include: storing usernames with their associated passwords, or representing mathematical functions where the function name acts as a key and its implementation as a value.
| Is This Answer Correct ? | 0 Yes | 0 No |
How does break work in python?
So, what is an iterator, then?
how do I protect python code?
How do you find the type and identification number of an object in python?
Point out the use of help() function?
What does none type mean in python?
Can you use r in python?
What does isnull mean in python?
What is django python?
What is class variable in python?
What is iterable python?
Describe how to send email from a python script?