Based on what I understood your question, I have two interpretations
Assuming that the data entered is a string (from an input for example) ... and you want to check if they contain integers, you could do something like this:
entrada=input(">>")
if not entrada.isdigit():
print("Por favor usa solo números enteros")
else:
entero=int(entrada)
#Continuar la ejecución del código
In case you refer to a variable and want to check its type:
entrada="15" # un string
if type(entrada)==str:
print("no admito strings")
elif type(entrada)==int:
#operaciones con el entero
#Continuar con la ejecución del código
In the case of the latter, it will not accept data such as "15", but the first example would do so.
I hope I have helped.