In a normal dictionary in Python, there is no order maintained between keys. To solve this problem, we can use OrderDict class in Python. This class is available for use since version 2.7.
It is similar to a dictionary in Python, but it maintains the insertion order of keys in the dictionary collection.
A Module is a script written in Python with import statements, classes, functions, etc. We can use a module in another Python script by importing it or by giving the complete namespace.
With Modules, we can divide the functionality of our application in smaller chunks that can be easily managed.
Python provides // operator to perform floor division of a number by another. The result of // operator is a whole number (without decimal part) quotient that we get by dividing the left number with the right number.
It can also be used floordiv(a,b).
10// 4 = 2
-10//4 = -3
None is a reserved keyword used in Python for null objects. It is neither a null value nor a null pointer. It is an actual object in Python. But there is only one instance of None in a Python environment.
We can use None as a default argument in a function.
During comparison we have to use “is” operator instead of “==” for None.