Created
April 9, 2020 18:36
-
-
Save Deep18-03/a57cc8442bd4410420ed91cbcf5c55c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phonenumber=input('enter your phonenumber') | |
def isphonenumber(number): | |
if len(phonenumber) != 10: | |
return False | |
for i in range(0,10): | |
if not number[i].isdecimal(): | |
return False | |
return True | |
print(isphonenumber(phonenumber)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment