Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
number = input("Enter Phone number: ")
if len(number)==12:
if number[3]=='-' and number[7]=='-':
print('Phone number is valid')
else :
print("Phone number is invalid")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment