Skip to content

Commit f5b887e

Browse files
committed
third commit
0004
1 parent 06b0ba4 commit f5b887e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Silocean/0004/Test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__author__ = 'Tracy'
2+
3+
import io, re
4+
5+
count = 0
6+
7+
with io.open('text.txt', 'r') as file:
8+
for line in file.readlines():
9+
list = re.findall("[a-zA-Z]+'*-*[a-zA-Z]*", line)
10+
count += len(list)
11+
print(count)
12+

Silocean/0004/text.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Dursleys had everything they wanted, but they also had a secret, and their greatest fear was that somebody would discover it. They didn't think they could bear it if anyone found out about the Potters. Mrs. Potter was Mrs. Dursley's sister, but they hadn't met for several years; in fact, Mrs. Dursley pretended she didn't have a sister, because her sister and her good-for-nothing husband were as unDursleyish as it was possible to be. The Dursleys shuddered to think what the neighbors would say if the Potters arrived in the street. The Dursleys knew that the Potters had a small son, too, but they had never even seen him. This boy was another good reason for keeping the Potters away; they didn't want Dudley mixing with a child like that.

0 commit comments

Comments
 (0)