Napsteren
02-25-2011, 10:51 AM
Hello CF
Im new to python, and Im struggling with a code here.
How do i test if the user input is a number or a string?
print("Hello")
i = raw_input("Type a number = ")
if not a number:
print("Illegal")
The ( If not a number ) is where i need my code..
Best Regards,
Nap
Im new to python, and Im struggling with a code here.
How do i test if the user input is a number or a string?
print("Hello")
i = raw_input("Type a number = ")
if not a number:
print("Illegal")
The ( If not a number ) is where i need my code..
Best Regards,
Nap