Web Analytics

Python random.choice() Method

RandomChoice

The random.choice() method returns a random element from a non-empty sequence.

Syntax

random.choice(seq)

Return Value

A random element from the sequence.

Example

Output
Click Run to execute your code