Which of these built-in Python types is immutable?
Correct answer A. tuple
Explanation
Once a tuple is created its items cannot be added, removed or reassigned, which makes tuples immutable. Lists, dictionaries and sets are mutable containers with methods such as append, update and add. frozenset is the immutable counterpart of set, and str and int are immutable too.
Answer checked How we write and check questions
Discussion