data type of Python
Introduction: The computer is used to assist people, in the program design also mapped the real world classification, so as to facilitate the abstract analysis
Category: 1. Digital
2. String
3. List
4. META Group
5. Dictionary
1. Number Type
| Type |
Name |
Range |
| Integral type |
Int |
-2,147,483,647 to 2,147,483,647 |
| Long Integral type |
Long |
Infinite. Mandatory type mode: 123L |
| Floating-point type |
Float |
|
| Plural type |
Complex |
|
2. Strings String
Defined by: Quotation mark double quotation mark same effect
Elements: Alphanumeric symbols (non-special system symbol Collection)
note ; "" "" is a joke "" "" triple quote docstring is usually used to make a string, "" "" "
When quotation marks conflict, the pure symbol uses: \ "
value a[] such as a= "ABCD" takes the value of the first a:a[1]=a # #第一位为0 "
sliced a[:]① complete cut a=[0:4] ABCD
② Single cut A=[2:] CD
③ Solid-length value a=[::2] AC
④ negative take a=[-1] D
vice;
Type () function data type query function