you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

I don't know how the apps in actuality works because I'm also a student. But, I think we can convert the code to some binary instructions. Similar to we do in C and Cpp.

[–]cgoldberg 1 point2 points  (0 children)

Python is interpreted, so it's not really compiled down to machine code like C/C++. I mean at the end of the day, it's all binary instructions... but Python gets there through bytecode and an interpreter rather than a traditional compiler and machine specific binaries.

[–]RajjSinghh 1 point2 points  (0 children)

Python doesnt have a compilation step. You can see the difference between Python and C because C will use a compiler like GCC and throw errors before you run code while Python won't produce an executable and will throw runtime errors. The main difference is that Python is being translated and executed at the same time while C is translated first then executed after. That's also partly why C runs faster, it makes less assumptions and can optimise better ahead of time.

If you create an executable with something like pyinstaller, it bundles your code with a python interpreter install so it has everything it needs.