random Filter

Data Structure

Documentation

Outputs a random item from a sequence. Like Python’s random.choice(value).

Variable

roshambo = ['Rock', 'Paper', 'Scissors']

Template

{{ roshambo|random }}

Possible Result

Scissors

Did we get something wrong? Is there a use case for the random filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on Oct. 30, 2022, 1:21 p.m. EST