Created
October 25, 2018 22:28
-
-
Save Ikhiloya/0b99111cc885910f9506c6b9d0e406ef to your computer and use it in GitHub Desktop.
Function to check if a number is of type 'int'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_int(x): | |
if( (abs(x) - (abs(int(x)))) > 0 ): | |
return False | |
else: | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment