Computer Science
A dictionary can contain keys of any valid Python types.
Python Dictionaries
1 Like
Answer
False
Reason — The keys of a dictionary must be of immutable types.
Answered By
2 Likes
Related Questions
A list of characters is similar to a string type.
For any index n, s[:n] + s[n:] will give you original string s.
Assertion. Lists and Tuples are similar sequence types of Python, yet they are two different data types.
Reason. List sequences are mutable and Tuple sequences are immutable.
Assertion. Modifying a string creates another string internally but modifying a list does not create a new list.
Reason. Strings store characters while lists can store any type of data.