How to Check If an Object Is an Integer in Python


In this example we will show how to check if an object is an integer or not in Python.

Source Code

a = 10
result = isinstance(a, int)
print(result)

Output:

True
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments