---restore content starts---
1, why use built-in types:
A) built-in objects make programs easier to write
b) Built-in objects are extended components
c) Built-in objects tend to be more efficient than custom data structures
d) Built-in objects are part of the language standard
Main built-in objects for 2,python
Object Type Example Constants/create
Digital 1234,3.1415,3+4j,decimal (decimal), fraction (fractional)
The string ' spam ', ' hello,world ' "is immutable, read by relative position, can redefine a string, and take the same variable name, Python will clean up the old object during the run."
list [1,2,3,4,[5, ' spam ']] "ordered set, can be nested, can be dynamically increased or decreased, by relative position to read"
Dictionary {' Work ': ' Zhangfei ', ' Age ': 24} ' can be nested, can be dynamically added and subtracted '
Tuples (1, ' spam ', 4, ' U ') "immutability"
File MyFile = open (' Data.txt ', ' R ')
Set set (' abc '), {' A ', ' B ', ' C '}
Other type types, None,bool
Programming unit type functions, modules, classes
---restore content ends---
Two: Python object type