Write difference between lists and dictionaries.

Question :

Write difference between lists and dictionaries.

The difference between lists and dictionaries are:
(a) In dictionary, index value can be of any data type and is called key, but in list index value is an integer.
(b) No sequence operation such as slicing and concatenation be applied to dictionaries as dictionary is not a sequence. Since it is not maintained in any specific order, operation that depends on a specific order can not be used where as slicing and concatenation are applied on lists.
(c) List are sequential collections (ordered) and dictionaries are non-sequential collections (unordered).


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad