¿Cómo solo obtengo un entero usando Python si no es condicional?
print 'enter a number'
s = raw_input()
s = float(s)
q = int(s)
if s == q:
print 'it is an integer'
else:
print 'it is not an integer'
Cuando alguien ingresa un carácter, también me gustaría que se muestre el mensaje "No es un número entero". ¿Cómo puedo hacer eso?