What to note in the Basic Python Tutorial (2nd edition revision)

Source: Internet
Author: User

Presumably now everyone learning Python will use 3.0 and more versions, although the 2.X version is still a lot, but these two years with some open source projects no longer support 2.X version, 3.X has become a trend.

It is in this background, I recently used this "basic Python tutorial" when the textbook, I found that although the author mentioned 2. X and 3.X version is different, but some places do not point out, and even let the 3.X version of the friend to mislead, I will follow the use of the process, update some of the problems encountered, hoping to let beginners do not feel bothered.

Let's start with the information about the textbook, because the version is important.

Basic Python Tutorial (2nd edition revision) isbn:9787115353528

Questions and solutions are as follows, constantly updated

1. The comparison of input and raw_input is mentioned in section 1.11, 4 (21 pages), but in 3. In the Python version of X, input has been used instead of raw_input, and this section concludes with a special reminder that the raw_input function should be used whenever possible unless there is a special need for input , which may be in the 2. Version of x is applicable, but in 3. The version of X is invalid, I think, since the author knows 3. The version of X, why not here alone click on the difference of two versions in this place? Rather than advocating the use of the Raw_input function.

2. About Print

Print in 3. The version of X has become a function, so use print "hello,world!" directly in the idle This kind of statement, will be error, look for beginners attention.

What to note in the Basic Python Tutorial (2nd edition revision)

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.