title: I get TypeError: choice() got an unexpected keyword argument 'k' , when using python random.choice
body: <p>I want to generate a random string of length n, on a given alphabet.</p>
  <pre class="lang-py prettyprint-override"><code>import random
  alphabet = &quot;ACTG&quot;
  n= 10
  # print(''.join(random.choice(alphabet) for x in range(n)) ) # work fine
  
  print(''.join(random.choice(alphabet, k=n))) # doesn't work
  </code></pre>
  <p>The error:</p>
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File &quot;&lt;input&gt;&quot;, line 3, in &lt;module&gt;
  TypeError: choice() got an unexpected keyword argument 'k'
  </code></pre>