Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import print_function
- import io
- word = '@'
- with io.open('/home/aprokurov/test.doc', encoding='utf-8') as file:
- for line in file:
- if word in line:
- print(line, end='')
- n = '+7'
- with io.open('/home/aprokurov/test.doc', encoding='utf-8') as file:
- for line in file:
- if n in line:
- print(line, end='')
Add Comment
Please, Sign In to add comment