To make my question clearer, I give an example in code R
which is the language in which I have a little more experience.
Suppose I have the simple variable "a" that is worth 5. First of all I want to validate if it is numeric using is.numeric:
a <- 5
is.numeric(a)
[1] TRUE
Now, to check if it is not numerical, we use a sign! before the method and we get the following:
!is.numeric(a)
[1] FALSE
My question is whether it is possible to do something like that in Python, "denying" a method like isinstance () that follows the structure:
isinstance(variable, tipo)
For example, if we apply negation to isinstance, I get:
a= 5
!isinstance(a, int)
"isinstance" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
I did not find any useful information, so I pose my question. If there is material that I have overlooked, I would also greatly appreciate it if you would let me know.