Set blog surya

PYTHON PROGRAMMING SET SET: Set are used to store multiple items in a single variable. sets are written with curly brackets. EXAMPLE: a={"apple","banana","cherry"} print(a) SET METHOD: 1.UNION() Return a set cotaining the union of sets. EXAMPLE: 2.INTERSECTION() Return a set,that is the intersection of two or more sets. EXAMPLE: 3.DIFFERENCE() Returns a set containing the difference between two or more sets. EXAMPLE 4.CLEAR() Remove all the elementsfrom the set. EXAMPLE 5.DIFFERENCE_UPDATE() Remove the items in this set that are also included in another specified set. 6.INDERSECTION_UPDATE() Remove the items in this set that are not present in other, specified sets. EXAMPLE 7.ISDISJOINT() ...