What code is used in python to have a pop up asking the user whether they want to exit the programme?

There should be a button to click 'ok' and another to click 'cancel' and return back to the current loop.