There is an inbuilt method in python called " type(variable) ". lets you want to know the type of a variable "a" you just have to write "type(a) " For a better explanation see the following source code:- a = 10 b = 20.5 c="Tech with code" #finding the type of a temp=type(a) print("Datatype of veriable a is") print(temp) #finding the type of b temp=type(b) print("Datatype of veriable c is") print(temp) #finding the type of c temp=type(c) print("Datatype of veriable c is") print(temp) The output of above code:-
No comments:
Do not add any link in the comments.
For backlink, contact us.