School/task_061021/main.py
Kristofers Solo 3edcb8fe51 task 061021
2021-10-06 09:49:27 +03:00

14 lines
324 B
Python

import re
with open('book.txt', encoding='utf-8') as book:
lines = book.read()
# lines = [line.strip() for line in book if "Chapter 1" in line]
# for line in lines:
# if line.strip() == "Chapter 1":
# var = []
# var.append(line.strip())
results = re.search("Chapter 59", lines)
# print(lines)
print(results)