import random
def headsortails():
random_side = random.randint (0,1)
if random_side == (0):
print("Heads")
else:
print("Tails")
answer_yes = "Yes" .lower()
answer_no = "No" .lower()
heads_or_tails = input("\n\nLets do 'Heads or tails'. I got a binary coin right here \n\nHeads = 0\nTails = 1\n\n[Press Enter]")
tosscoin = input("\nTo toss coin and choice type 0 or 1: ")
tosscoin = "0", "1"
print("Revealing coin... *rolling drums*\n")
(headsortails())
again = input("\nDo you want to play again? [Enter Yes/No]) ")
if again == (answer_yes):
print (heads_or_tails)
I have already defined heads_or_tails but it wont print it after I answer yes. Also, is there a way to write a string that I can combine with the new print?