+ 6
What is the difference between dictionary and list & dictionary and tuple?
I'm very confused about dictionary. Can anyone please make me clear about dictionaries?
5 Answers
+ 5
Dictionary: containd key-value pairs
example: {"name": "Simon", "age": 20}
List: containd ordered values
example: ["name", "age]
Tuples: immutable, it cannot be changed
example: ("name", "age")
+ 3
Thanks Airree
+ 3
Dictionaries are not commonly used, at least to my knowledge. However there are some code that require unique key value pairs as a necessity. They wont fuction otherwise. I dont remember where right now but ı do remember it contains web.
+ 2
Airree Pratibha Bharti although the Tuple is immutable, if the element in a Tuple is itself a mutable type like a List, its nested contents can be changed.