import re
def read_file_text():
s = []
f = open('yingyu.txt', 'r')
for lines in f:
ls = lines.strip(' ').replace(' ', '').replace('\n', '').replace('?', '').split('/')
for inx,val in enumerate(ls):
s.append(val)
print(s)
f.close()
Press the green button in the gutter to run the script.
if name == 'main':
read_file_text()
网友评论