WeCodeAcademy
❮ math.pirandom.randint() ❯

random.choice()

A random item from a sequence.

Group: random

Syntax

random.choice(seq)

Example

Examplepython
Open in editor »

← All of Python Reference