title: Optimizing Python Code
body: <p>I've been working on one of the coding challenges on InterviewStreet.com and I've run into a bit of an efficiency problem. Can anyone suggest where I might change the code to make it faster and more efficient?</p>
  
  <p><a href="http://pastie.org/2417934" rel="noreferrer">Here's the code</a></p>
  
  <p><a href="http://pastie.org/2417941" rel="noreferrer">Here's the problem statement if you're interested</a></p>