📜  如何检查元组A是否包含元组B python的所有元素? - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:24.557000             🧑  作者: Mango

代码示例1
>>> tuple1 = (1, 2)
>>> tuple2 = (1, 2, 3, 4, 5)
>>> set(tuple1).issubset(tuple2)
True
>>> set(tuple2).issuperset(tuple1)
True