Skip to content

Generate random boolean value in Python

import random

# Generate a random boolean.
def random_boolean():
    return random.choice([True, False])

def main():
    # Generate a random boolean.


See also  PHP code snippet - How to get local current time in laravel?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.