1.

What are the difference between List and Dictionary?

Answer»

Difference between List and Dictionary

1. List is an ordered set of elements. But, a dictionary is a data structure that is used for matching one element (Key) with another (Value). 

2. The index values can be used to access a particular element. But, in dictionary key represents index. Remember that, key may be a number of a string.

3. Lists are used to look up a value whereas a dictionary is used to take one value and look up another value.



Discussion

No Comment Found