I don’t know python so can’t help directly with the code.
The process though, is that you send a POST to Twitch with your subscription request.
Twitch then send a GET request to your callback URL to make sure it’s reachable which includes a hub.challenge, you have to respond to this GET request by replying the hub.challenge back to Twitch along with a 200 status code.
At this point, the subscription should be successfully created and you can verify that by checking the Get Webhook Subscriptions endpoint: https://dev.twitch.tv/docs/api/reference/#get-webhook-subscriptions