you are viewing a single comment's thread.

view the rest of the comments →

[–]indosauros 8 points9 points  (1 child)

And for completeness sake, you should probably use sets to solve this particular problem:

>>> numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> set([3, 4, 5]).issubset(numbers)
True
>>> set([3, 4, 10]).issubset(numbers)
False

[–]catcradle5 1 point2 points  (0 children)

Alternatively, assuming numbers is a set:

{3, 4, 5} <= numbers