I am using a number generator currently using the code below
from random import randint
print(randint(0,1))
which while it works, i need to generate either 0 or 1 but i need the generator to generate 1 with a x (say 80%)
probability
how can i achieve this effectively in python ?