mirror of
https://github.com/kristoferssolo/School.git
synced 2025-10-21 20:10:38 +00:00
task 061021
This commit is contained in:
parent
40afc6a042
commit
3edcb8fe51
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.venv/
|
||||
.vscode/
|
||||
.vscode/
|
||||
/__pycache__/
|
||||
BIN
IKEA_scraper/__pycache__/ikea.cpython-39.pyc
Normal file
BIN
IKEA_scraper/__pycache__/ikea.cpython-39.pyc
Normal file
Binary file not shown.
14543
task_061021/book.txt
Normal file
14543
task_061021/book.txt
Normal file
File diff suppressed because it is too large
Load Diff
13
task_061021/main.py
Normal file
13
task_061021/main.py
Normal file
@ -0,0 +1,13 @@
|
||||
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)
|
||||
Loading…
Reference in New Issue
Block a user