Python core Programming Notes--fourth chapter

Source: Internet
Author: User

Chapter Fourth Python objects

1. Type is also an object:

A = 4;type (a)-><type ' int ', where "<type ' int ' >" is a Type object (which can be assigned to a variable), you can use the type (type (a)) to verify

2.python2.2 start, class and type unification, class = Type, instance is object of type

3. Any object has a natural Boolean value

4. integer objects, string objects , tuple objects are immutable objects, Python efficiently caches integers and string objects , so a=3;b=1+2; (A is B) returns True, If the float type returns false. The cache range for integers is [-5,256] closed interval

Python core Programming Notes--fourth chapter

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.