---
title: "Discussion on \"Why Your Python Tuple Can't Be a Dictionary Key\" | Hashnode"
description: "Discussion on \"Why Your Python Tuple Can't Be a Dictionary Key\". Learn why Python tuples containing lists can't be dictionary keys or cache keys, and how to fix the unhashable type error in your code."
url: "https://hashnode.com/posts/why-your-python-tuple-cant-be-a-dictionary-key/6960c95b19fb270f1083af10"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Your Python Tuple Can't Be a Dictionary Key](https://samuelochaba.hashnode.dev/why-your-python-tuple-cant-be-a-dictionary-key?utm_source=hashnode&utm_medium=feed)

Learn why Python tuples containing lists can't be dictionary keys or cache keys, and how to fix the unhashable type error in your code.

Jan 9 · 2 min read · samuelochaba.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#programming-ciovqvfcb008mb253jrczo9ye](https://hashnode.com/tag/programming-ciovqvfcb008mb253jrczo9ye)
-   [#ai](https://hashnode.com/tag/ai)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Samuel Ochaba](https://hashnode.com/@samuelochaba)

@samuelochaba

  
[View profile](https://hashnode.com/@samuelochaba)

Teaching Python for future AI engineers

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
