import re
input= open('input.py', 'r', encoding='utf-8').read()
input= open('input.py', 'r', encoding='utf-8').read()
# convert a line (\n) starting with ## into an empty line (\n)
output= re.sub(re.compile(r"##.*[\n]" ) , "\n" , input)
open('output.py', 'w', encoding='utf-8').write(output)
output= re.sub(re.compile(r"##.*[\n]" ) , "\n" , input)
open('output.py', 'w', encoding='utf-8').write(output)
No comments:
Post a Comment