Why do I only print the first letters of each item in the list?
<p>I was wondering why I only print the first letter of each item I input. I would like for it to loop through the list and print each item that starts with one of the letters in the first_letters variable. </p>

<pre><code>phrase = input('Enter a list: ')
first_letters = ['A','B','C','D']
for name in phrase:
    if name[0] in first_letters: 
        print(name)

#['Alpha', 'Bravo', 'Charlie', 'Delta', 'Echo', 'Foxtrot']
</code></pre>

<p>If this is Python3, then the list you are entering is not actually a list but a string. So when you call,</p>

<pre><code>for name in phrase:
</code></pre>

<p>you are calling each letter in that string. So the variable <code>name</code> is actually one letter so <code>name[0]</code> is equal to <code>name</code>.</p>

python