摘要: 列表转字符串 list1 = ['abc' , 'def' , 'ghi'] str1 = ','.join(list1) str1 = '##'.join(list1) 字符串转列表 str1 = ('abc,def,ghi') list1 = str1.... 阅读全文
posted @ 2015-04-27 15:53 LarryKnight 阅读(478) 评论(0) 推荐(0) 编辑
摘要: import cPickle as pf = file('data.txt' , 'w')data = (1 , 'A' , "hello")p.dump(data , f) # 将数据保存到本地文件中f.close()f = file('da... 阅读全文
posted @ 2015-04-27 10:31 LarryKnight 阅读(716) 评论(0) 推荐(0) 编辑