In Python, int represents an integer, do you remember what bool, float, and str represent separately?
A: BOOL is a Boolean type, float is a floating-point type, and Str is a string type
Do you know why the Boolean type (bool) of True and False is replaced by 1 and%?
A: Binary only: 0 and 1, with 0 and one representing False and True
Use INT () to convert a decimal number to an integer, the result of rounding up or down?
Answer: It is rounded down
Our human mind is accustomed to the "rounding" method, do you have any way to make int () in the way of "rounding" to take the whole?
Answer: Int (num+0.5)
To get a variable type, the video shows you can use type () and isinstance (), which do you prefer to use?
Answer: Type ()
Python3 can give the variable a name in Chinese, do you know why?
A: Python 3 is utf-8 encoded by default
This article is from the "Champion Small Lemon" blog, please make sure to keep this source http://lemonit.blog.51cto.com/6043645/1597866
No. 005: The Python data type of the chat