title: list assignment index out of range using python 3.6, backpropagation
body: <pre><code>IndexError : list assignment index out of range 
  </code></pre>
  
  <p>here is my code on training the dataset</p>
  
  <pre><code>def train_network (network, train,l_rate,n_epoch,n_outputs):
      for epoch in range(n_epoch):
         sum_error = 0
         for row in train:
             outputs = forward_propagate(network,row)
             expected = [0 for in in range(n_outputs)]
             expected[row[-1]] = 1
  </code></pre>
  
  <p>I get the error on line <code>expected[row[-1]]=1</code> wat could be wrong</p>