python random boolean 10 true 10 false code example Example: random boolean python import random bool(random.getrandbits(1))