Work needs: Prepare to learn python from the spring festival. It is a scripting language, similar to Java and PHP, and implements interpretation.
The language is simple, elegant, and powerful. It can be applied to a variety of fields, from desktop programs, websites, game development, embedded, mobile device development, and automatic control, which can greatly simplify your workload.
In addition to underlying system programming, C/C ++ and Python are both competent, and can be embedded into programs in other languages with less code.
Python can run on unix, linux, and win platforms.
Download the development environment:
You can directly search for python. Currently, the latest version is 3.3, and the version I downloaded is 2.7.
The installation is simple. You can directly install it by default. My installation directory is C: \ Python27.
After installation, the following menu appears in the program:
VcSsyM +/qreixr3MqKOstdrI/bj2ysfD/release + sLro7o8L3A + CjxwPiAgICAgICAgPj4 + IHByaW50IA = "Hello Python! 'Then press enter to see the following:
Hello Python!
Try again:
>>> 2 + 3*6 # Good calculator 20
Assignment:
>>> A, B, c = 5, 6, 'Tom '# You can assign values to the three variables at the same time. You do not need to write more equal signs. This is concise enough. >>> A5 >>>> b6 >>> c 'Tom'
Direct exchange results:
>>> A, B = B, a # Here, values can be exchanged directly to the extreme. >>> A6 >>> b5
You do not need to declare the variables in advance and use them directly. python determines the data type by itself.
Well, you should have a preliminary impression on it. Here, we will continue.