例如,我想检查元组(1, 2)中的每个元素都在元组中(1, 2, 3, 4, 5).我不认为使用循环是一种很好的方法,我认为它可以在一行中完成.
(1, 2)
(1, 2, 3, 4, 5)
python tuples list set
list ×1
python ×1
set ×1
tuples ×1