Python Learning Phase Summary

Source: Internet
Author: User

1. String Although you can look up values as a list by subscript, but you cannot assign values directly like lists

2. View the default encoding commands under Windows CHCP General return to the active code page: 936 (corresponding to gbk2312)

3. The ' W ' mode of the file needs to be cautious, because it creates a new file, and if it has the same file name, it will delete all the contents of the previous file and then re-write the file

4. For the following code, the file F is actually an iterator, and then when you print it, it always saves one row of data in memory.

 for inch F:     Print (line)
View Code

5. The function will end when it touches the return, no matter if there is any other code below the return

6. The principle of the adorner:

@1. The source code of the decorated function cannot be modified

@2. Cannot modify the calling method of the decorated function

Higher order function: A or B

A: Pass the function name of a function as an argument to another function (guaranteed not to modify the source code of the decorated function)

B: The return value contains the function name (you can not modify the calling method of the decorated function)

Python Learning Phase Summary

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.