import random


def unfair_coin_flip(p):
    """Given a float p in the range [0,1), this function will return True with probability p, and False otherwise.
    """
    return True if random.random() < p else False
    # random.random() returns a uniformly distributed pseudo-random floating point number in the range [0, 1).
    # This number is less than a given number p in the range [0,1) with probability p.