Mar*_*ury 2 python set python-3.x
在Python中,是否有一个集合可以有效地充当包含所有可能集合的集合?
CSZ*_*CSZ 6
你可以子类化set:
set
class FullSet(set): def __contains__(self, item): return True fullset = FullSet() print({1, 2, 3} in fullset)
输出:
True
归档时间:
9 年,3 月 前
查看次数:
402 次
最近记录: