I can not work out why it keeps repeating the function, even though the condition to change the while loop to false is met. Here is an example of what I am trying to do:
confirm=True
def program():
    name=input("What is your name? ")
    country=input("What is your country? ")
    runagain=input("Would you like to run again? Enter no or yes: ")
    if runagain=="no":
        print("Thank You")
        confirm=False
    else:
        print("Rerun")
        confirm=True
while confirm==True:
    program()
 
     
     
     
    