What’s the difference between a list and a dictionary?



What’s the difference between a list and a dictionary?..

Answer / Mukesh Kumar Paswan

A list is a collection of mutable ordered elements, whereas a dictionary is a collection of key-value pairs. Lists are indexed by integers, while dictionaries are indexed by keys. Lists can contain duplicate values, but dictionaries cannot have duplicate keys.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

With python, how do you find out which directory you are currently in?

1 Answers  


Python list of lists, changes reflected across sublists unexpectedly

1 Answers  


How can you identify the data type of any variable in python?

1 Answers  


How can I execute arbitrary python statements from c?

1 Answers  


Are uuids sequential?

1 Answers  


List some pdb commands.

1 Answers  


How to pass indefinite number of arguments to any function?

1 Answers  


What are types in python?

1 Answers  


Is python strongly typed?

1 Answers  


What is a Pandas Series, and what? does it entail

2 Answers  


What is python and python scripting?

1 Answers  


What is a function for flatten an irregular list of lists?

1 Answers  


Categories