Answers for "How to check that tuple A contains all elements of tuple B python?"

0

How to check that tuple A contains all elements of tuple B python?

>>> tuple1 = (1, 2)
>>> tuple2 = (1, 2, 3, 4, 5)
>>> set(tuple1).issubset(tuple2)
True
>>> set(tuple2).issuperset(tuple1)
True
Posted by: Guest on June-09-2021

Code answers related to "How to check that tuple A contains all elements of tuple B python?"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language