You need to understand that there are software programs that were compiled into executable files (written by languages like C/C++), there are programs that are translated into bytecode which is then executed by the virtual machine (written in languages like Java), and there are programs that are interpreted and do not need to be compiled by the developer to be used (written in languages such as Python).
It is impossible to get the exact source code of a compiled program because compilation is an irreversible one-way process in such languages. There are decompilers that can analyze the executable and try to recreate the source code, but they are often very inaccurate and the resulting code is very hard to work with. The only sure thing you can do is disassemble the executable program using a disassembler such as IDA Pro or OllyDbg for Windows, or gdb for linux (there are many more). It will read the executable machine code and convert it into assembly code which can be analyzed and modified (other tools then the disassembler are required to do this, but they usually come together with the disassembler, or other way round). This process is often called reverse engineering, as you attempt to understand how the entity was created and how it works without having the original blueprints (or source code in our case).
It is more easy to decompile java or similar bytecode though. Check out Java Decompiler.
Finally, it you do not need to do anything to get the source code of interpreted programs because they are not compiled by the developer in most cases. All you need to do is just open the python or other interpreted program file with a plain text editor.
I hope this helped a bit.
Have fun reversing executables!