+ 1
My number checker doesn't work.
Hello world,I need your help:( I'm beginner in programing,and I tried to make a number checker in python,but it's not workina and I dont know why:( can anyone help me please? https://code.sololearn.com/c280xcE0cJLt/?ref=app P.S. I think it's a problem with re.search,because it doesn't work only when I input there one number twice,in one str.
3 Answers
+ 1
If you change the line with re.search to:
if all(n in nums for n in num):
...I think it works for you.
0
# KUMURUKE cc Do you mean like that;
try:
num=int(input("enter some numbers or some letters: "))
print(num)
print("a number")
except ValueError:
print("not a number")
0
thank you for responses guys,i've fixed it. There was num instead of n:D