Possible to patch the Android kernel with root?
That Python script appears to work by generating the source code for, then compiling a custom kernel module, then loading that module to do the actual patch. It expects, among other things, a working C compiler, make program, and kernel sources (at least headers) for the kernel you're running at /lib/modules/$(uname -r)/build.

So, no, that's not going to work on Android. Typically you have none of those things. With a cross-compile environment (on a PC) set up to build your phone's kernel, you could likely build that module, copy it over, then (as root on the Android device) load it. But building it directly on the phone would be quite an undertaking.