Generating permutations of a given length - Python
<p>I want to generate a list of permutations over a given alphabet of length n.
For example, if <code>n = 3</code> and the alphabet includes <code>{A,B}</code>, output should be: <code>AAA,AAB,ABA,BAA,ABB,BAB,BBA,BBB</code></p>