title: Type error ' list indices must be integers or slices, not tuple' (line 6)
body: <p>i am trying to predict next word in compose mail modal but I am getting above error:</p>
  
  <pre><code>sequences = list ()
  
  for i in range(1, len(encoded)):
      sequence = encoded[i - 1:i + 1]
      sequences.append(sequence)
  sequence
  
  X, Y = sequences[:,0], sequences[:,1] # error on this line
  X = np.expand_dims(X, 1)
  Y = np.expand_dims(Y, 1)
  
  </code></pre>