Python learning notes 03: python core data type, python learning notes

Source: Internet
Author: User

Python learning notes 03: python core data type, python learning notes

Basically, Python is an object-oriented language. Its Class module supports advanced concepts such as polymorphism, Operator overloading, and multi-inheritance. It is easy to use OOP with simple syntax and type unique to Python. Python syntax is simple and easy to use.

Python programs can be divided into modules, statements, expressions, and objects. 1. The program consists of modules. 2. The module contains statements. 3. The statement contains an expression. 4. expressions are used to create and process objects.

The core data types of Python are as follows:

Object Type Example constant/create
Number 1234, 3.1415
String 'Spam', "guido's", B 'a \ xolc'
List [1, [2, 'three '], 4]
Dictionary {'A': 65, 'B': 66}
Tuples (1, 'spam', 4, 'U ')
File File = open('1.txt ', 'R ')
Set Set ('abcd'), {'A', 'B', 'C '}
Other Types Type, None, Boolean
Programming Unit Type Functions, modules, and classes
Implementation-related types Compiled code stack Tracing

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.