Hi Zet!
Python is cross-platform, it runs on Windows, Mac-OS, Linux, Android and on lesser known operating systems. None of them runs on PIC controllers.
.hex is as much hardware dependent as it gets. A hex file created for PIC16F877 *might* run on PIC16F877A, but there's also a chance that a certain .hex-file doesn't run on certain revisions of the very same chip.
So, the true answer to your question is: To make a python program run on a microcontroller, you have to re-write it for the specific controller you want to use in a suitable language.
Unless there's a microcontroller-targeted python dialect I'm not aware of. But, usually python is an interpreted language, which is very uncommon on microcontrollers for various reasons.
Greets,
Kiste