Question: I found, that there is related question, about how to find if at least one item exists in a list:  

[How to check if one of the following items is in a list?](https://stackoverflow.com/questions/740287/python-check-if-one-of-the-following-items-is-in-a-list)

But what is the best and pythonic way to find whether all items exists in a list?

Searching through the docs I found this solution:

```
>>> l = ['a', 'b', 'c']
>>> set(['a', 'b']) <= set(l)
True
>>> set(['a', 'x']) <= set(l)
False

```

Other solution would be this:

```
>>> l = ['a', 'b', 'c']
>>> all(x in l for x in ['a', 'b'])
True
>>> all(x in l for x in ['a', 'x'])
False

```

But here you must do more typing.

Is there any other solutions?

Answer: 
I would probably use [`set`](http://rgruet.free.fr/PQR26/PQR2.6.html#Sets) in the following manner : 

```
set(l).issuperset(set(['a','b'])) 

```

or the other way round : 

```
set(['a','b']).issubset(set(l)) 

```

I find it a bit more readable, but it may be over-kill. Sets are particularly useful to compute union/intersection/differences between collections, but it may not be the best option in this situation ...
What if your lists contain duplicates like this:

```
v1 = ['s', 'h', 'e', 'e', 'p']
v2 = ['s', 's', 'h']

```

Sets do not contain duplicates. So, the following line returns True.

```
set(v2).issubset(v1)

```

To count for duplicates, you can use the code:

```
v1 = sorted(v1)
v2 = sorted(v2)

def is_subseq(v2, v1):
    """Check whether v2 is a subsequence of v1."""
    it = iter(v1)
    return all(c in it for c in v2) 

```

So, the following line returns False.

```
is_subseq(v2, v1)

```