def random_triangular(low, high, mode):
    while True:
        proposal = uniform(low, high)
if proposal < mode:
    pass
Python, SimPy: How to generate a value from a triangular probability distribution?