Python is an interpreted language
Python interpreter from top to bottom, sentence by sentence will translate your code into machine code, sent to the machine to perform the translation line, sending a line
The whole process does not generate machine code file, the next run Python programs, have to re-translated into machine code
Advantages: a piece of code can be cross-platform use, anyway, because every time you run the code to be re-translated to the new platform will use a new platform translator, translated into the new platform can understand machine code, so the same code can be The new platform
Disadvantages: slower than compiled languages, but now the CPU to deal with them, run a piece of code, time-consuming that far
Java is a compiled language
Written Java code to be compiled, the compiled code is translated into machine code when put up, and generate machine code file, the next user to run code when you do not have to recompile it, and the same segment with the new platform compiler, the new platform can be compiled into machine code to identify
Advantage: cross-platform, running faster than Python
Cons: speed is not fast C language, the code is relatively lengthy, there is no simple Python
Python's design principles
1. Have the developers can be like reading the article as read code, Python code is simple
2. Python hope to complete short-term rapid development tasks, so Python's ability to expand good
3. want to do one thing, only one way, not this way can, as can be, reject the bells and whistles, ambiguous grammar
Python's advantages
1.Python is fully object-oriented language
(1) Python built a lot of the standard library, there are a variety of library is very powerful object
(2) Python community has a large number of third-party modules, covering all fields of artificial intelligence, machine learning, the whole world add objects to Python
(3) our open source object already exists through the rational use, can solve problems faster
2 can be written in C code, and then implanted into the Python program
Big code can be compiled into the C file, and then implanted into the Python, increase the speed
3.Python simple
Written in Python function, less code, easy to read
Python development software
1.Python3, you can use the network to download Quguan
2. Interactive ipython, command installation, write an implementation of a
3. Integrated Development Environment IDE: Pycharm, write code, then compile and run
The method of operation py file
Enter cmd into the window python3 python terminal, the terminal cd to the directory where the py file, you can finally enter the python * .py
The basic syntax of Python
1. The best line of code do one thing, there is only one verb
2. To properly indented: indentation: the indentation means; unexpected: do not want to see, the best by a space, do not use indentation
3. Do not add space before the code began to write from the top grid
4.python2.x does not support Chinese, write code to declare utf-8, python3.x support Chinese, need not be declared utf-8
Python does not consider the issue of backward compatibility
1. Python2 write code that can not run in Python3
2. Python2 Python3 code into the code can be used during Python 2.6, it not only performs Python2 code, code can be performed Python3
3. efforts to rewrite the code Python2 old, the new code is written Python3
Download ipython method
1.Win10 app store to download Ubuntu
2.Ctrl + R input system running Ubuntu Ubuntu (a black window)
3. How Baidu search, Ubuntu systems can be installed ipython
4. window10 installed directly ipython will encounter a variety of problems, so must rely on Ubuntu
5.ipython support auto-completion, is ideal for learning python white