random in python get random number between 0 and 1 code example Example: random 0 or 1 python from random import choice choice([True, False])