[MUSIC] Welcome to this week's programming tips everybody. This week's going to be pretty short for me. All I'm going to do is cover a few things about sets. So, the first thing that can be confusing about sets is simply the notation. So consider here, this is the normal way that we create a set. Using the set function or constructor spelled S-E-T. Okay, and so we run that, and we also see that the output displays the same notation. Now, we can get confused, because, well these curly braces. We're used to curly braces for sets from math, okay. And here that curly braces is legal. The problem is, if you remember, that's not a set, folks. Okay, if I use the type function. And show the type of that. It shows us that that's a dictionary, a dict. If you remember that's the empty dictionary. Now you might try something also curly braces with elements inside, like that. Again, standard math notation. And here we simply fail, get an error message. Okay, well, this actually can be a confusing point for those who have had prior experience with Python. Because some versions of Python, 2.7, 3.0, for example. Do support this notation. But we're using 2.6 here in CodeSkulptor and it doesn't support that. Okay, just remember that. So Scott introduced sets and several of their methods, including Union and Intersection and the like. But what he didn't do was illustrate that in fact there are also mutating methods for sets. So here's an illustration, okay? Just going to run this. And so, s.intersection t here is going to produce and return a new set that is the intersection of the two s and t. But it's not going to change s or t. Whereas, there's another method called s.intersection_update(t), that it doesn't return anything interesting, it returns none. Okay, but what it does, it changes s to be the intersection. And it does not change t, okay. Let's go to the documentation here and under Sets here. You'll see that there's Union, Intersection Difference and Symmetric Difference. And then there's four corresponding mutating operations, okay. Updates, Intersection update, Difference update, and Symmetric Difference update. It's kind of confusing that this one's called Update and not Union Update, but that's what it's called. In addition, there's some other methods here that are also mutating. Okay, so just remember that there's these two flavors, and the ones that do update like this, are updating this set, not this set. Of course anytime that we have mutation we can get into the same confusing examples, resulting from a listing that we saw much earlier for lists, and mutation was list. So here's one example, okay. S is a set. T is assigned to be the same set. We use Intersection Update on s. And then we print s and t. And we see that not only is s changed but also t has changed because, after all, it's the same set. Now, one other little thing that I'd like to point out here. Notice that this method and in fact, most of the set methods. They don't require that this argument actually be a set. It can be anything such as a list or a string or a dictionary or a set, okay. Just want to point that out as well. Okay, that's it for programming tips this week and for this class. Bye, guys.