1. python features and installation [python getting started tutorial]

Source: Internet
Author: User

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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.