python re


SUBMITTED BY: franek4700

DATE: Jan. 21, 2017, 11:38 a.m.

FORMAT: Python console session

SIZE: 142 Bytes

HITS: 12215

  1. import re
  2. fh = open("simpsons_phone_book.txt")
  3. for line in fh:
  4. if re.search(r"J.*Neu",line):
  5. print line.rstrip()
  6. fh.close()

comments powered by Disqus