Python check if list of keys exist in dictionary
<p>I have a dictionary that looks like that:</p>

<pre><code>grades = {
        'alex' : 11,
        'bob'  : 10,
        'john' : 14,
        'peter': 7
       }
</code></pre>

<p>and a list of names <code>students = ('alex', 'john')</code></p>

<p>I need to check that all the names in <code>students</code> exist as keys in <code>grades</code> dict.</p>

<p><code>grades</code> can have more names, but all the names in <code>students</code> should be in <code>grades</code></p>

<p>There must be a straightforward way to do it, but i'm still new to python and can't figure it out. tried <code>if students in grades</code>, didn't work.</p>

<p>In the actual cases, the lists will be much bigger.</p>

<p>thanks</p>
