python basics - data types

【type of data】

1 Python's numeric types are divided into integer, long, floating, boolean, and complex types.

2 python has no character type

3 There are no ordinary types inside python, any type is an object.

4 If you need to see the type of a variable, you can use the type class, which can return the type of the variable or create a new type.

5 Python has 3 ways to represent string types, namely single quotes, double quotes, and triple quotes. Single and double quotes have the same effect. Python programmers prefer to use single quotes, and C/Java programmers are used to using double quotes for strings. Characters such as single quotation marks, double quotation marks, or newlines can be entered in triple quotation marks.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325252693&siteId=291194637