Python Learning notes-2 variables

Source: Internet
Author: User

The meaning of variables in 1.pytho: Define an area in memory to give a value, and then use a variable to refer to the defined value, the variable can be understood as a label, when the need to call which value to use the label to invoke, the variable can be re-assigned, the value will be re-assigned, the current values are replaced by the previous value, a value That is, multiple variables point to the same value, that is, the same value, and you can use the ID () function to see where the value referenced by the variable is in memory.

2. Assignment: For example, a=1, which means to assign a value of 1 to a variable a

3. Specification of variable name: Cannot start with a number, or a keyword as a variable name, can start with a letter, or _ and other special characters, for the variable naming is to follow easy to understand, so that the program is more humane

Python Learning notes-2 variables

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.