random.triangular

The random.triangular function returns a random number N drawn from a triangular distribution such that low <= N <= high, with the mode specified in the third argument, mode.

If the mode argument is not specified, it defaults to the value (low + high) / 2, that is, the value located at the midpoint of the range considered.

Submitted by admin on Sat, 03/13/2021 - 09:10

random.shuffle

The random.shuffle function shuffles the sequence x in-place.

If you want to shuffle an immutable sequence x, you can use:

x = sample(x, k = len(x))
Submitted by admin on Fri, 03/12/2021 - 09:00