Computer Science
Answer
| Tuple | Dictionary |
|---|---|
| Tuples are ordered collection of elements. | Dictionaries are unordered collection of key-value pairs. |
| Tuples are immutable. | Dictionaries are mutable. |
| Tuples are enclosed in parentheses (). | Dictionaries are enclosed in curly braces {}. |
| Elements of tuples can be accessed by index. | The items in a dictionary are accessed by keys. |