擅长:python、mysql、java
<blockquote>
<p>However, I am getting a list index out of range error. I do understand why this is, but i do not understand how i can solve this error without loosing the last letter of my list (throug: range(0,len(wordlist) - 1)</p>
</blockquote>
<p>实际上,您可以使用<code>range(0,len(wordlist-1))</code>,并且不会丢失最后一个字母<code>next_letter</code>将是最后一封信</p>