Standard type classification for Python

Source: Internet
Author: User
Tags scalar

Data properties Storage model Update model Access model
Digital Scalar/Atomic Type Immutable types Direct access
String Scalar/Atomic Type Immutable types Order
List Container Variable type Order
Meta-group Container Immutable types Order
Dictionary Container Variable type Mapping

The update model can be immutable, depending on the ID of the object. Cases:

>>> a = 4;b = "a"; c = [n/a];d = (n/a);
>>> ID (a), id (b), ID (c), id (d), ID (e)
(30303248L, 34497040L, 43208904L, 43599480L, 34692456L)
>>> a= a+1
>>> ID (a)
30303224L
>>> b= + b
>>> ID (b)
39367184L
>>> C.append (4)
>>> ID (c)
43208904L

>>> d= (1,2,3,4)
>>> ID (d)
39259096L

>>> e = {1,2,3,4}
>>> ID (E)
34692456L

Standard type classification for Python

Related Article

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.