title: Creating an adjacency list graph from a matrix in python
body: <p>So I'm trying to make a graph of letters (to represent a boggle board) from a matrix of letters. So say I have something like:</p>
  
  <pre><code>[ [ A, B, C, D], 
    [E, F, G, H], 
    [I, J, K, L], 
    [M, N, O, P] ].
  </code></pre>
  
  <p>I want each node to be a letter, but I'm having trouble figuring out how to get the neighbors for each node. For example, node A would have neighbors B, E, and F. While node K would have neighbors F, G, H, J, L, M, O, and P.  Any help would be appreciated!</p>