Run
import random import string def flipCoin(): f = random.random() return True if f<0.5 else False for i in range(0,5): print(flipCoin())
Output