Untitled
unknown
plain_text
3 years ago
532 B
17
Indexable
cau 1
import re
fileName = input()
file = open(fileName,'r')
for line in file:
t = re.findall(r"ISBN\s\d{1,5}-\d{3}-\d{5}-\d",line)
if t:
for p in t:
print(p)
cau 2
import re
fileName = input()
file = open(fileName,'r')
for line in file:
print(re.sub(r"\s+", " ", line))
cau 3
import re
fileName = input()
file = open(fileName,'r')
for line in file:
t = re.findall(r"\(\+?84\)[789][0-9]{8}",line)
if t:
for p in t:
print(p)Editor is loading...