I was trying to solve this problem. https://www.hackerrank.com/challenges/introduction-to-regex
The code is working absolutely fine in my PC. But hacker ranks throws error after two runs. Dont know why.. Please help
import re
n1 = int(input())
for i in (0, n1):
n = input()
if (re.findall(r'[a-zA-Z]',n)):
print("False")
elif re.match(r'+[0-9]*.[0-9]*', n):
print ("True")
elif re.match(r'-[0-9]*.[0-9]*', n):
print ("True")
elif re.match(r'[0-9]*.[0-9]*', n):
print ("True")
else:
print("False")
