Python basics 2. python Basics

Source: Internet
Author: User

Python basics 2. python Basics

Iii. Analysis of variables, objects and values

1. If you don't remember it, it will be finished.

1.1 remember: all data is an object

1.2 remember: all variables are references to data objects.

1.3 analysis: reference count sys. getrefcount in python

2. variable naming rules

2.1 remember what you can do. It must start with a letter.

2.2 remember what you cannot do. You cannot use keywords.

2.3 The most reasonable combination: the file name is lower case, the variable is lower case, and the function name is lower case. _ Make the variable clearer.

2.4 case sensitive.

3. assign values

3.1 remember dynamic features.

More than 3.2 values are assigned.

3.4 Delete.

4. Life

1. The three built-in functions must be well-developed. Type, help, dir.

2. Use built-in methods to learn str objects.

3. I have to deal with a string with a bad ending and a strange space at the beginning. What should I do.

4. self-taught.

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.