How is Python platform independent?

9k Views Asked by At

I know that Python is platform independent, but I don't understand how that works for CPython. If the interpreter and some of the modules are written in C, aren't those going to be platform dependent?

1

There are 1 best solutions below

0
luther On BEST ANSWER

C is platform independent in the sense that it can be compiled for any machine for which a compiler is made to target that machine. That's why the Python source code is platform independent, even if a Python binary can only work on one platform.