jeapedu 135 集合的其他函數

链接: https://pan.baidu.com/s/1lAMbvgQgiw9MUc3UlVg0wA 密码: qv3f

print(help(set.pop))
s = set("hello jeapedu")
print(s)
s.pop()
print(s)
s.pop()
print(s)

print(help(set.difference_update))      # update,影響原值
s = set('123456789')
s1 = set('2345')
print('s', s)
print('s1', s1)
print(s.difference(s1))
print('s', s)
s.difference_update(s1)
print('s', s)

print(help(set.isdisjoint))

print(help(set.remove))

print(help(set.add))
阅读更多

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