Python data type

Source: Internet
Author: User

I. INTRODUCTION two. Data type

Number types have two categories: integer type and floating-point type, respectively

Integer type:

integer int function: Age, grade, social Security number, QQ number, etc. integer number correlation definition: Ages # Essence Age=int (Ten)

2. Floating-point types

Floating float function: salary, height, weight, body parameters and other floating-point definitions: Salary # Essence Salary=float (3000.3)

3. Other types (Learn)

long Plastic (understanding)    in Python2 (no long shaping concept in Python3):    >>> num=2l    >>> type (num)     'long'> plural (learn)    >>> x=1-2j    >>> x.real     1.0    >>> x.imag    -2.0
Three. String type Four. Boolean type five. List type six. Tuple type seven. Dictionary type eight. Collection type

Python data 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.