- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Do you think Python Dictionary is really Mutable?
Yes, Python Dictionary is mutable. Changing references to keys doesn't lead to the creation of new dictionaries. Rather it updates the current dictionary in place.
example
a = {'foo': 1, 'bar': 12} b = a b['foo'] = 20 print(a) print(b)
Output
This will give the output −
{'foo': 20, 'bar': 12} {'foo': 20, 'bar': 12}
- Related Articles
- Do you think a Python dictionary is thread safe?
- Why do you think tuple is an immutable in Python?
- Do you think operator < is faster than
- How do you know when someone really loves you?
- What do you think when you are alone?
- Why do you think privatization of education is bad?
- How do you Loop Through a Dictionary in Python?
- Do you think garbage collector can track all the Python objects?
- Do you think homeschooling is better than available schools around?
- Do you think heart break makes you a better person?
- Do you think JavaScript Functions are Object Methods?
- How do you think apps have changed learning?
- Do you think live-in relationship is good option in India?
- What do you think is the main cause for teenage depression?
- Do you think declarations within Python class are equivalent to those within __init__ method?

Advertisements