Python remove elements from two dimensional list
<p>Trying to remove min and max values from two dimensional list in array.
My code:</p>

<pre><code>myList = [[1, 3, 4], [2, 4, 4], [3, 4, 5]]
maxV = 0
minV = myList[0]0]
for list in myList:
   for innerlist in list:
      if innerlist &gt; maxV:
         maxV = innerlist
      if innerlist &lt; minV:
         minV = innerlist
   innerlist.remove(maxV)
   innerlist.remove(minV)
print(myList)
</code></pre>

<p>This causes me some erros, which i not particulary understand. I'm quite sure that innerlist is not array but ordinary variable. But still i think it should be somehow possible to remove min and max elements from two dimensional list.
I mean I need to remove in every innerlist in my list highest and lowest values.
LF help!
Regards.</p>