The first chapter of the "0 pressure python" knowledge points induction

Source: Internet
Author: User

Chapter One (beginner Python) knowledge points induction

Python is derived from the ABC language.

ABC language is a teaching language that Guido participates in design, developed for the non-professional programmer.

Python was introduced by Dutch programmer Guido Van Rossum in 1991, retains many of ABC's features, and incorporates elements of the Modula-3 language.

The Modula-3 has simple and safe features.

Python's name is inspired by the BBC's comedy "The Flying Circus of the Python troupe", which has no direct connection to the Python, although the troupe's member John Cleese initially named "Sinister" and "hypocritical".

Given the capabilities of Python, it is often seen as a "prototyping" or "rapid application development" language. You can use Python to quickly write programs that are rewritten with C and C + + when you need to improve your operational efficiency.

After installing Python under Windows, you can use basic interaction mode, or you can use the interactive development environment--idle, but strongly recommend the latter.

In idle, you can use the command Help and specify the type to get assistance. such as: Help (str)

In idle, fix the error. You can do this when the code block has a lot of content and you don't want to re-enter the whole thing:

(1) Place the cursor in any line of code block (if the code block contains only one line of code, be sure to place the cursor at the end of the row);

(2) Press ENTER

The entire code block magically reappears, and the cursor is at the end of the code block. You can fix them casually. Finally, to resubmit the code block, place the cursor at the end of the last line and press ENTER two times.

Of course, you can also use the ALT + P key/ALT + N key to return the previous/next code.

Cont.:

(1) If there is currently no closing parenthesis, closing brace, or right square bracket with opening parenthesis, opening brace, or left bracket, the line of code will automatically extend to the next row , as follows:

Total_amount = (This_amount + that_amount

+ A_big_number + count +even_more_amounts)

In this case, indentation does not matter, but Python usually requires that indentation be consistent.

(2) In some cases, you may not be able to use the above approach. But it must be extended to the next line, and there is no other way to use the backslash \.

My_str = ' I am typing a very long \

Line of code. '

Please note: Backslash \ After, cannot have any characters, spaces, comments are no exception.

The first chapter of the "0 pressure python" knowledge points induction

Related Article

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.