python random choose true false code example
Example: python random true false
bool(random.getrandbits(1)) #is still about twice as fast as random.choice([True, False])
bool(random.getrandbits(1)) #is still about twice as fast as random.choice([True, False])