[Solved] What function allows to ask wether a variable is an integer inside an if statement [closed]
You can do this using type or insinstance of python builtin module, like, if type(user_input) is int: # your code type returns the type of the obect. Or using insinstance, if isinstance(user_input, int): # your code isinstance return True if the object is instance of a class or it’s subclass. Now, in your code you … Read more