How to Verify Type of Numeric Object in Python


In this example we will show how to verify the type of numeric object in Python.

Source Code

a = 5        # int
b = 6.8      # float
c = 2 + 3j   # complex

print(type(a))
print(type(b))
print(type(c))

Output:



Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments