Monday, 27 May 2019

None Data Type

5. None Data type:

In python, None means nothing or No value associated. The ‘None’ datatype represents an object that doesn’t contain any value. In java/c it is called ‘null’. It is used for as a default value.

Where do we use None data type?
If the value is not available, then to handle such type of situation None is used.

Example program on None
def ex():
   a=10

print(ex())

"""output""
 None

Youtube channel click here to see this video

Next Topic:      Sequences data types
Previous Topic: Bool data type

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(&qu...