We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a3b561 commit 288684aCopy full SHA for 288684a
RegexandParsing/Validatingphonenumbers.py
@@ -7,16 +7,16 @@
7
Problem : https://www.hackerrank.com/challenges/validating-the-phone-number/problem
8
'''
9
# Enter your code here. Read input from STDIN. Print output to STDOUT
10
-n=int(raw_input())
+n=int(input())
11
for i in range(0,n):
12
- tmp_str=raw_input()
+ tmp_str=input()
13
len_tmp_str=len(tmp_str)
14
if(len_tmp_str!=10):
15
##print "LENGTH PROBLEM"
16
- print "NO"
+ print ("NO")
17
elif(tmp_str[0]!="7" and tmp_str[0]!="8" and tmp_str[0]!="9"):
18
##print "START PROBLEM"
19
20
else:
21
check=1
22
for i in tmp_str:
@@ -26,7 +26,7 @@
26
check=0
27
break
28
if(check==1):
29
- print "YES"
+ print ("YES")
30
31
##print "NUMBER PROBLEM"
32
0 commit comments