首页 > 其他 > 详细

tmp

时间:2016-08-19 19:07:51      阅读:108      评论:0      收藏:0      [点我收藏+]
# encoding: UTF-8
file_name = r‘C:\Users\xshi\Desktop\1.txt‘

AB_list = []

with open(file_name) as f:
    content = f.readlines()
    AB_list.append(content)
x = AB_list[0]
print type(x)
print len(x)
CD_list = []
for i in x:
i_list =  i.split(‘ ‘)
# print i_list
while ‘‘ in i_list:
i_list.remove(‘‘)
CD_list.append(i_list)

#print CD_list
print CD_list[0]

dict1 = dict(CD_list)




附件列表

     

    tmp

    原文:http://www.cnblogs.com/lshconfigure/p/5788648.html

    (0)
    (0)
       
    举报
    评论 一句话评论(0
    关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
    © 2014 bubuko.com 版权所有
    打开技术之扣,分享程序人生!