update
This commit is contained in:
parent
409a2489d7
commit
6fedb5759d
BIN
mr/.DS_Store
vendored
BIN
mr/.DS_Store
vendored
Binary file not shown.
@ -7,7 +7,7 @@ for line in sys.stdin:
|
|||||||
# remove leading and trailing whitespace
|
# remove leading and trailing whitespace
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
# split the line into words
|
# split the line into words
|
||||||
words = re.findall(r'\b\w+\b', line) # using regex to find words
|
words = re.findall(r'\b[\w\s]+\b', line) # using regex to find words
|
||||||
# increase counters
|
# increase counters
|
||||||
for word in words:
|
for word in words:
|
||||||
# apply regex to remove non-alphanumeric characters and convert to lowercase
|
# apply regex to remove non-alphanumeric characters and convert to lowercase
|
||||||
|
Loading…
Reference in New Issue
Block a user