>>> from random import random >>> p=0.7 >>> for i in range(7): if random()