Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- def main():
- f = open('text.txt', 'r')
- for eachLine in f:
- if (len(eachLine)==10):
- f_num=re.search(r'^[789]',eachLine)
- if (f_num==9):
- print("YES")
- else : print("NO")
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement