CBSE Class 11 Computer Science Question 39 of 88

Tuples and Dictionary — Question 4

Back to all questions
4
Question

Question 4

What are the differences between tuple and dictionary?

Answer
TupleDictionary
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.