Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialcameth tanashe
4,260 Pointsi don't really understand the whole concept of mutability and how we apply it
its about mutability
1 Answer
Oszkár Fehér
Treehouse Project ReviewerHi, Cameth Tanashe. In Python everything is an Object, every variable holds an object instance. When an object is initiated, it's assigned an object id which is unique. The type is defined when it runs and once set can never change, however, its state can be changed if it is mutable, a mutable object can be changed after it is created, and an immutable object can’t, objects which can change state, mutable( list, dict, set) and objects which can't change state, they are immutable ( int, float, tuple). If you still feel fuzzy about this concept check out these websites: Python documentation [https://docs.python.org/3/library/stdtypes.html?highlight=mutable] Or [https://medium.com/@meghamohan/mutable-and-immutable-side-of-python-c2145cf72747] a deeper explanation about mutable and immutable. I hope this will help you out. Happy coding.