Skip to content

Instantly share code, notes, and snippets.

@Deep18-03
Created April 9, 2020 18:36
Show Gist options
  • Save Deep18-03/a57cc8442bd4410420ed91cbcf5c55c0 to your computer and use it in GitHub Desktop.
Save Deep18-03/a57cc8442bd4410420ed91cbcf5c55c0 to your computer and use it in GitHub Desktop.
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