Python高手之路【三】python基础之函数

基本数据类型补充:


set 是一个无序且不重复的元素集合

class set(object):
     """
     set() -> new empty set object
     set(iterable) -> new set object
 
     Build an unordered collection of unique elements.
     """
     def add(self, *args, **kwargs): # real signature unknown
         """
         Add an element to a set,添加元素
 
         This has no effect if the element is already present.
         """
         pass
 
     def clear(self, *args, **kwargs): # real signature unknown
         """ Remove all elements from this set. 清除内容"""
         pass
 
     def copy(self, *args, **kwargs): # real signature unknown
         """ Return a shallow copy of a set. 浅拷贝  """
         pass
 
     def difference(self, *args, **kwargs): # real signature unknown
         """
         Return the difference of two or more sets as a new set. A中存在,B中不存在

你可能感兴趣的:(python,开发语言,爬虫)