title: Most efficient way of representing a two dimensional grid in Python
body: <p>I am new to Python and have been trying my hand at some programming problems to get a better hold of the language.
  So far I've read Guido's essay at <a href="https://www.python.org/doc/essays/graphs/" rel="nofollow">https://www.python.org/doc/essays/graphs/</a> . This has helped me understand how to work with graphs.
  But, competitive programming problems mostly have two dimensional grids:</p>
  
  <pre><code>U..X
  ..X.
  X..X
  ..X.
  </code></pre>
  
  <p>How do I represent those in Python? Is a list of lists a good representation? Is there a better or more "Pythonic" method? Thanks.</p>