I want to end the program after the user has entered Y. I put break after the print, but it doesn't break the loop and still goes back to input. How do I break the loop?
while True:
        exit_input = input("Are you sure you want to exit? Enter Y/N (YES/NO): ")
        if (exit_input == 'Y'):
            print("\nYou have successfully exited the program. Thank you! Have a great day! ")
            break
        elif (exit_input == 'N'):
            run = menu()
            break
        else:
            print("Invalid Input\n")
 
     
    