title: How do I randomly select from a list in Python?
body: <p>Basically, I've got a homework task of programming a text based battle simulator in Python. Obviously I've gone with pokémon...
  I would like the enemy to be randomly selected, however I don't know how to randomly select from a list...</p>
  
  <pre><code>    foo = ['a', 'b', 'c', 'd', 'e']
      from random import choice
      print choice(foo)
  </code></pre>
  
  <p>This is what I've been told to try but I've got no modules or anything imported...
  How can I make this work,
  appreciated.</p>