Python集合的方法

增加

    add(self, *args, **kwargs)

删除

    clear(self, *args, **kwargs)

    pop(self, *args, **kwargs)

    remove(self, *args, **kwargs)

    discard(self, *args, **kwargs)

获取

    copy(self, *args, **kwargs)

    intersection(self, *args, **kwargs)

    intersection_update(self, *args, **kwargs)

    union(self, *args, **kwargs)

    update(self, *args, **kwargs)

    difference(self, *args, **kwargs)

    difference_update(self, *args, **kwargs)

    symmetric_difference(self, *args, **kwargs)

    symmetric_difference_update(self, *args, **kwargs)

判断

    isdisjoint(self, *args, **kwargs)

    issubset(self, *args, **kwargs)

    issuperset(self, *args, **kwargs)

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页