title: python: How do I assign values to letters?
body: <p>I want to assign a value to each letter in the alphabet, so that a -> 1, b -> 2, c -> 3, ... z -> 26. Something like a function which returns the value of the letter, for example:</p>
  
  <p><code>value('a') = 1</code></p>
  
  <p><code>value('b') = 2</code></p>
  
  <p>etc...</p>
  
  <p>How would I go about doing this in python? </p>