+ 1
List one similarity and difference between list and dictionary
3 Antworten
+ 6
Lists: are indexed; ordered; can store duplicated elements.
Dictionaries: store key-value pairs; the keys must be unique; the values are accessed via the keys; are unordered.
+ 4
In list we access the values using index.but in dictionary we access the value by using key.remember that dictionary is faster than list.
because in list we check the values O(n) values but in dictionary it is check by O(1)