Returning list of sorted words
<p>I am trying to return a list of sorted words where the letters are alphabetically sorted. For example:</p>

<pre><code>&gt;&gt;&gt; sorted_words(["bet", "abacus", "act", "celebration", "door"])

['act', 'bet', 'door']
</code></pre>

<p>My function should return a new list of sorted values, but it must keep out any words where the first letter has lower or equal unicode than the following letters. For example, "door" is appended to a new list because d' &lt;= 'o' and 'o' &lt;= 'o' and 'o' &lt;= 'r'. This is what I have written so far, but I'm having no luck. </p>

<pre><code>def sorted_words[wordlist]:
    result = []
    for word in wordlist:
        if word[0] &lt;= word[1:]:
             result.append(word)
    print(word)
</code></pre>

<p>I know this isn't right, I just don't know how to compare the first letter of each word with the rest of the letters. Any help would be greatly appreciated. I also have to use the sorted() method but I am unsure how to use that. </p>