Maestro1

Untitled

May 17th, 2022
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. n = input().split('-')
  2. flag = False
  3. if len(n)==4 and n[0] == '7' and len(n[1])==3 and len(n[2])==3 and len(n[3]) == 4:
  4.     for i in n[1:]:
  5.         if i.isdigit():
  6.             flag = True
  7. elif len(n) == 3 and n[0] == '301' and len(n[1])==3 and len(n[2])==4:
  8.     for i in n[1:]:
  9.         if i.isdigit():
  10.             flag = True  
  11. if flag == True:
  12.     print('YES')
  13. else: print('NO')
  14.  
Advertisement
Add Comment
Please, Sign In to add comment