Transcript from the "Mutability Review" Lesson
[00:00:00]
>> Nina Zakharenko: Let's talk about mutability. I feel like y'all have a pretty clear picture of mutability, but let's take a quick look at this cheat sheet. So mutability simply put is, can the contents of a mutable object be changed? Yes, the contents of an immutable object can't be after it's been created.
[00:00:22] So for the simple data types, the ints, floats, strings, booleans, those are all immutable objects, right? We've seen numbers and strings be used as keys in a dictionary. We've seen them be used in sets, right. For the container types, is a list mutable?
>> Nina Zakharenko: Yes. Is a set mutable?
[00:00:51]
>> Speaker 2: Yes.
>> Nina Zakharenko: Is a dictionary mutable?
>> Speaker 2: Yes.
>> Nina Zakharenko: Is a tuple mutable?
>> Speaker 2: No.
>> Nina Zakharenko: No, you all get gold stars. I'm so proud of you. Okay, that's a lot. This is kind of the longest chapter, but these are some of the most important types that you'll be working with in Python.