+ 1
I need help on Phone Number Validator [Python]
so, this is my last code project to complete python core path, why it is throwing syntax error here at line 5? here is my code ``` import re #your code goes here num = int(input("type number") pattern = r"\A(1|8|9)\d{7}
quot; match = re.search(pattern, num) if match: print("valid") else: print("Invalid") ```1 Answer
+ 1
0h no! I forgot to close the bracket.
also, I managed to solve this challenge, here is the final code :)
import re
#your code goes here
num = input()
pattern = r"\A[1|8|9]\d{7}quot;
valid = re.search(pattern, num)
if valid:
print("Valid")
else:
print("Invalid")