Introduction
In this blog, I will explain how to find the data type in Python. It will clearly display in the run module which type of the datatype appears in the program.
Software Requirement
Python2.7.11
Programming
- print("Welcome To C#Corner.....")
- print("Finding Datatype :")
- print(type(21))
- print(type(21111111111111))
- print(type(21.23))
- print(type("C#corner"))
- print(type('j'))
- print(type(12j+2))
Explanation
Let us see the difference in the datatype.
- print("Welcome To C#Corner.....")
- print("Finding Datatype :")
- print(type(21))
In this code, I have to type the data as 21. Now, it will display in the run Window, i.e. which type of the data type is seen in the output.
Output 1
- print("Welcome To C#Corner.....")
- print("Finding Datatype :")
- print(type(21))
- print(type(21111111111111))
In this code, I have to type the data as 21111111111111111. Now, it will be displayed in the run Window; i.e. which type of the data type is seen in the output.
Output 2
- print("Welcome To C#Corner.....")
- print("Finding Datatype :")
- print(type(21))
- print(type(21111111111111))
- print(type(21.23))
In this code, I have to type the data as 21.23. Now, it will be displayed in the Window i.e. which type of the data type is seen in the output.
Output3
- print("Welcome To C#Corner.....")
- print("Finding Datatype :")
- print(type(21))
- print(type(21111111111111))
- print(type(21.23))
- print(type("C#corner"))
- print(type("j"))
In this code, I have to type the data as C#Corner. Now, it will be displayed in the Window i.e. which type of the datatype is seen in the output.
Final Output
kalu singh raoPosted Jul 11, 2016, 2:34 AM
Nice...
Anu VPosted Jul 11, 2016, 12:22 AM
Nice