I will continue to explain while reading the reference book.
Python mainly has interactive programming and coding methods to write to modules (files). You are free to choose either one depending on the intended use, or you can develop while using both. Interactive programming is to launch a terminal or command prompt, launch Python in it, and then code on the terminal. Basically, if you write one line and press Enter, that line will be executed on the PVM. There is also a way to write several lines at once, but this time. By the way, even if you don't use print statement, you can get the output automatically interactively. By the way, Anaconda sets variables at the time of installation and also prepares a command prompt for Anaconda.
Anaconda Command Prompt and IDE (Integrated Development Environment) Spyder:
Launch Python at the command prompt:
Input and output values:
However, in interactive mode, once the code is executed, the code is not saved. So if you want to write the same code, you have to copy and paste it, and you will have to compile it every time. By the way, CTRL + Z is for Windows and CTRL + D is for Unix to end Python in the prompt.
However, if you write it in a module, the code will remain semi-permanently, and once compiled, it will be automatically converted to chord, and you only have to execute the bytecode on the PVM. The Python file has a .py extension and the bytecode is .pyc (it automatically generates .pyc at compile time). There is a way to run the code in this file inside the prompt. For example, to run it as if you created a module called test.py at the prompt Will execute the code in the module. Unlike interactive, a print statement is required to print the values in the module. As I wrote in the previous post, I use Anaconda's IDE, so this method may be less used, but I thought it would be useful when I reviewed it.
Anaconda IDE (Spyder):
So far, I've explained the general development tools of Python, but from the next time, I'll actually write about coding.
Well, I thought I'd make a LIFO and FIFO in Python for the time being, but it seems that it will take some time to get started. If you have any corrections or questions in this post, please let me know in the comments or by e-mail!
Reference: First Python 3rd Edition (Publisher: O'Reilly Japan)
Anaconda download site (I think it's in English only): http://continuum.io/downloads