so the methods on sets clearly suggest that sets are meant to operate on other setsand that they are not just containers if we have data coming in from two different sources and need to quickly combine them in some wayto determine where the data overlaps or is differentwe can use set operations to efficiently compare them or if we have data incoming that may contain duplicates of data that has already been processedwe can use sets to compare the two and process only the new data finallyit is valuable to know that sets are much more efficient than lists when checking for membership using the in keyword if you use the syntax value in container on set or listit will return true if one of the elements in container is equal to value and false otherwise howeverin listit will look at every object in the container until it finds the valuewhereas in setit simply hashes the value and checks for membership this means that set will find the value in the same amount of time no matter how big the container isbut list will take longer and longer to search for value as the list contains more and more values extending built-ins we discussed briefly in when objects are alikehow built-in data types can be extended using inheritance nowwe'll go into more detail as to when we would want to do that when we have built-in container object that we want to add functionality towe have two options we can either create new objectwhich holds that container as an attribute (composition)or we can subclass the built-in object and add or adapt methods on it to do what we want (inheritancecomposition is usually the best alternative if all we want to do is use the container to store some objects using that container' features that wayit' easy to pass that data structure into other methods and they will know how to interact with it but we need to use inheritance if we want to change the way the container actually works for exampleif we want to ensure every item in list is string with exactly five characterswe need to extend list and override the append(method to raise an exception for invalid input we' also minimally have to override __setitem__ (selfindexvalue) special method on lists that is called whenever we use the [index"valuesyntaxand the extend(method