#coding=utf-8
a=input("请输入文件的名字")
with open(a) as f: #用with as方式打开文件,能应对异常出现
for line in f: #以行为处理对象
a_strip=line.strip() #去掉空格并以":"作为分隔
a_split=a_strip.split(":")
print(a_split)
#coding=utf-8
a=input("请输入文件的名字")
with open(a) as f: #用with as方式打开文件,能应对异常出现
for line in f: #以行为处理对象
a_strip=line.strip() #去掉空格并以":"作为分隔
a_split=a_strip.split(":")
print(a_split)