[Tutor] Print random letters

Kent Johnson kent37 at tds.net
Wed Dec 21 21:12:52 CET 2005

Johan Geldenhuys wrote:
> Hi all,
> I want to print out random letters from A - Z. I know how to do this 
> with numbers, but don't know with letters.
> Any ideas wil be greatly appreciated.

Take a look at random.choice() or possibly random.shuffle() or random.sample(). And 
remember that a string is a kind of sequence.


More information about the Tutor mailing list