title: Elegant Python code for Integer Partitioning
body: <p>I tried to write code to solve the standard Integer Partition problem (<a href="http://en.wikipedia.org/wiki/Partition_%28number_theory%29" rel="noreferrer">Wikipedia</a>). The code I wrote was a mess. I need an elegant solution to solve the problem, because I want to improve my coding style. This is not a homework question.</p>