Test for number?

Dr. Pastor elpX at adsihqX.com
Mon Sep 4 13:39:56 EDT 2006


In the following code I would like to ascertain
that x has/is a number. What the simplest TEST should be?
(Could not find good example yet.)
---
x=raw_input('\nType a number from 1 to 20')
if TEST :
		Do_A
else:
		Do_B
---
Thanks for any guidance.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----



More information about the Python-list mailing list