IndexError: list assignment index out of range Python
<pre><code>def mode(given_list):
    highest_list = []
    highest = 0
    index = 0
    for x in range(0, len(given_list)):
        occurrences = given_list.count(given_list[x])
        if occurrences &gt; highest:
            highest = occurrences
            highest_list[0] = given_list[x]
        elif occurrences == highest:
            highest_list.append(given_list[x])
</code></pre>

<p>The code is meant to work out the mode of a given list. I do not understand where I am going wrong.</p>

<p>Exact Error I am receiving.</p>

<pre><code>line 30, in mode
    highest_list[0] = given_list[x]
IndexError: list assignment index out of range
</code></pre>