Best way to check if a collection only contains elements in another collection?
<p>What is the best way to check if an array/tuple/list only contains elements in another array/tuple/list?</p>

<p>I tried the following 2 approaches, which is better/more pythonic for the different kinds of collections?
What other (better) methods can I use for this check?</p>

<pre><code>import numpy as np

input = np.array([0, 1, -1, 0, 1, 0, 0, 1])
bits = np.array([0, 1, -1])

# Using numpy
a=np.concatenate([np.where(input==bit)[0] for bit in bits])
if len(a)==len(input):
    print 'Valid input'

# Using sets
if not set(input)-set(bits):
    print 'Valid input'
</code></pre>
