Outputs a random item from a sequence. Like Python’s random.choice(value).
Variable
roshambo = ['Rock', 'Paper', 'Scissors']
Template
{{ roshambo|random }}
Possible Result
Scissors
|random Filteroutputs a random item from a sequence.
Outputs a random item from a sequence. Like Python’s random.choice(value).
roshambo = ['Rock', 'Paper', 'Scissors']
{{ roshambo|random }}
Scissors
Did we get something wrong? Is there a use case for the
random filter that we should add? Please let us know.