0 Basic python-4.1 Python object introduction and standard type

Source: Internet
Author: User

Object, the core of object-oriented, and the core of Python

Python object has three properties

1. Identity: That is, ID, each object has an ID, through the ID (obj) to read, generally seldom use this value, so do not need to do too much of it

2. Type: Object holds what type of value, can be read by type (obj), the type itself is also an object, he returns not a string, but an object

Let's give one or two examples:

3. Value: object's data item

When an object is created, these three attributes are assigned, the first two are read-only, and the data items are variable

Python also has a series of built-in objects, which, in general, are sufficient for today's programming, if not enough or require special types of data storage, to build your own objects

Standard types of Python:

Integer shaping

Boolean Boolean type

float Float Type

Complex complex type, generally denoted by J, E denotes real number

String strings

List lists

Tuple tuples, similar arrays

Dictionary Dictionary similar to map

Right here, thank you.

------------------------------------------------------------------

Click to jump 0 basic python-Catalogue


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

0 Basic python-4.1 Python object introduction and standard type

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.