[Tutor] Print random letters

Terry Carroll carroll at tjc.com
Wed Dec 21 22:00:45 CET 2005

On Wed, 21 Dec 2005, Kent Johnson wrote:

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

Good call; I should have read all the replies first.

>>> random.choice(string.uppercase)

is much clearer than my suggestion.

More information about the Tutor mailing list