In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you what is the difference between the two types of Python object collation, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Mainly sort out the difference between Null and None.
1. None
Null object of Python
Python has a special type called Null object or NoneType,Python object collation with only one value, which is None. It does not support any operations and there are no built-in methods. If you are very familiar with the C language, you will know that the closest C type to the None type is the value of the void,None type is very similar to the NULL value of C (other similar objects and values include the undef of Perl and the void type and null value of Java). None has no useful properties, and its Boolean value is always False.
Example:
Resultset = Server.getOptionType (value)
Query the database and return its related information
If resultset = = None:
Object that represents this dataset as a NULL object.
Python Objects, all Python object collation has the following three characteristics:
Id: an identifier that distinguishes objects from each other. The id of any object can be obtained through the built-in id () function, whose value is the memory address. (identifier of the object ID) Type: the type of the object indicates the type that the object can hold and the operation that can be applied. You can use the built-in type () function to display the type of object. Value: the data item represented by the object. The identified Python objects have familiarity, data values, or executable code (such as methods).
None,Python has a special None object that has only one value, None. The None value is equivalent to the C language null. None has no attributes and is always equal to the false of a Boolean value.
The above is what is the difference between the two types of Python object collation. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.