Skip to content

Commit 288684a

Browse files
Update Validatingphonenumbers.py
Updated Code to Python3 standards.
1 parent 2a3b561 commit 288684a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

RegexandParsing/Validatingphonenumbers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
Problem : https://www.hackerrank.com/challenges/validating-the-phone-number/problem
88
'''
99
# Enter your code here. Read input from STDIN. Print output to STDOUT
10-
n=int(raw_input())
10+
n=int(input())
1111
for i in range(0,n):
12-
tmp_str=raw_input()
12+
tmp_str=input()
1313
len_tmp_str=len(tmp_str)
1414
if(len_tmp_str!=10):
1515
##print "LENGTH PROBLEM"
16-
print "NO"
16+
print ("NO")
1717
elif(tmp_str[0]!="7" and tmp_str[0]!="8" and tmp_str[0]!="9"):
1818
##print "START PROBLEM"
19-
print "NO"
19+
print ("NO")
2020
else:
2121
check=1
2222
for i in tmp_str:
@@ -26,7 +26,7 @@
2626
check=0
2727
break
2828
if(check==1):
29-
print "YES"
29+
print ("YES")
3030
else:
3131
##print "NUMBER PROBLEM"
32-
print "NO"
32+
print ("NO")

0 commit comments

Comments
 (0)