为什么在Python中使用“set”会出错?

2024-05-13 03:48:06 发布

您现在位置:Python中文网/ 问答频道 /正文

s = set('ABC')
s.add('z')
s.update('BCD')
s.remove('DEF') # error here
s -= set('DEFG')

Tags: addheredefupdateerrorremoveabcset