set_remove.py 147 Bytes
Newer Older
John R. Lenton's avatar
John R. Lenton committed
1
2
3
4
5
6
7
8
9
s = {1}
print(s.remove(1))
print(list(s))
try:
    print(s.remove(1), "!!!")
except KeyError:
    pass
else:
    print("failed to raise KeyError")