I think you could also use the type() function. See example below:
if type(yourvar) == int:
#Do stuff here if it is an integer
else:
#Do something here if it is not an integer
Regards
Peter
On 31/05/11 22:23, Hans Barkei wrote:
I want to make a program that finds all the prime numbers up to a
number inputed by the user.
I want to know if it is an integer because that will tell me if it is
divisible by that number or not.
***---------**/Hans/-----*
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor