How to generate a random string
<p>I'm trying to do a code where is generates a random string, but I have only just started coding so I don't want anything to the code to be too complicated.</p>

<pre><code>import random, string
randomthing = random.choice(string)
print(randomthing(10))
</code></pre>

<p>But it keeps saying the length (len) is not defined. What should I do?</p>