You need to have your script registered as a "systemd" service and then you can trigger that service from the udev rule.
This link:
https://coreos.com/os/docs/latest/using ... rules.html has the most concise description of such a solution that I can find with a quick google, but you have to ignore the parts about the virtualisation.
There should be some earlier threads in the forum regarding people that want to autocopy files from usb-memsticks automatically that also should contain similar information.
----
A more "hacky" way would be that your .py script is always running but it will not do anything until it find the file "/tmp/ready.txt", and the only command you need to do in the udev rule is to create the file with "touch /tmp/ready.txt".