1. Home
  2. Data Science
  3. Python
  4. Which of these can NOT be used as a dictionary key in…

Added 25 Nov 2026

Which of these can NOT be used as a dictionary key in Python?

  1. int
  2. list Correct answer
  3. str
  4. tuple of ints

Correct answer

B. list

5 views

MCQSEXAM

Explanation

Lists are mutable and unhashable, so they cannot be keys.

Reference

Asked in: Python Interview Dictionaries

https://docs.python.org/3/tutorial/datastructures.html#dictionaries

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs