built-in functions and exceptions set([items]creates set populated with items taken from the iterable object items the items must be immutable if items contains other setsthose sets must be of type frozenset if items is omittedan empty set is returned setattr(objectnamevaluesets an attribute of an object name is string same as object name value slice([start,stop [step]returns slice object representing integers in the specified range slice objects are also generated by the extended slice syntax [ : :krefer to the section "sequence and mapping methodsin for details sorted(iterable [key=keyfunc [reverse=reverseflag]]creates sorted list from items in iterable the keyword argument key is singleargument function that transforms values before they are passed to the compare function the keyword argument reverse is boolean flag that specifies whether or not the resulting list is sorted in reverse order the key and reverse arguments must be specified using keywords--for examplesorted( ,key=get_namestaticmethod(funccreates static method for use in classes this function is implicitly invoked by the @staticmethod decorator str([object]type representing string in python string contains -bit characterswhereas in python strings are unicode if object is supplieda string representation of its value is created by calling its _str_ (method this is the same string that you see when you print the object if no argument is givenan empty string is created sum(items [,initial]computes the sum of sequence of items taken from the iterable object items initial provides the starting value and defaults to this function only works with numbers super(type [object]returns an object that represents the superclasses of type the primary purpose of this object is to invoke methods in base classes here' an exampleclass ( )def foo(self)super( ,selffoo(if object is an objectthen isinstance(objecttypemust be true if object is typethen it must be subclass of type refer to "classes and objectoriented programming,for more details in python you can use super(in method with no arguments in this casetype is set to the class in which the method is defined and object is set to the first argument of the method although this cleans up the syntaxit' not backwards-compatible with python so it should be avoided if you're concerned about portability lib fl ff