Guest User

Untitled

a guest
Nov 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. from __future__ import print_function
  2. import io
  3. word = '@'
  4. with io.open('/home/aprokurov/test.doc', encoding='utf-8') as file:
  5. for line in file:
  6. if word in line:
  7. print(line, end='')
  8. n = '+7'
  9. with io.open('/home/aprokurov/test.doc', encoding='utf-8') as file:
  10. for line in file:
  11. if n in line:
  12. print(line, end='')
Add Comment
Please, Sign In to add comment