+ 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.

8th Sep 2018, 8:49 AM
KUMURUKE cc
KUMURUKE cc - avatar
3 Réponses
+ 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.
8th Sep 2018, 9:07 AM
Russ
Russ - avatar
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")
8th Sep 2018, 11:53 AM
Sousou
Sousou - avatar
0
thank you for responses guys,i've fixed it. There was num instead of n:D
8th Sep 2018, 4:30 PM
KUMURUKE cc
KUMURUKE cc - avatar