墨智仁

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2017年5月31日

摘要: menu = { '湖南':{ '怀化':{ '安江':{ '杂交水稻基地':{}, '文峰塔':{}, '安江大桥':{}, '高庙遗址':{}, }, '洪江':{ ... 阅读全文
posted @ 2017-05-31 14:26 墨智仁 阅读(80) 评论(0) 推荐(0)

2017年5月29日

摘要: f = open('cc','r',encoding='utf-8') f_new = open('cc.bak','w',encoding='utf8') for line in f: if ' 想让我知难而退' in line: line = line.replace('想让我知难而退','想让我主动出击') f_new.write(line) f.close... 阅读全文
posted @ 2017-05-29 11:53 墨智仁 阅读(117) 评论(0) 推荐(0)

摘要: list_1 = [1,4,5,7,3,6,7,9] list_1 = set(list_1)#集合 list_2 = set([2,6,0,66,22,8,4])#集合 print(list_1,list_2) print(list_1.intersection(list_2))#交集 共同有的 print(list_1.union(list_2))#并集 并在一起去重复的 print(li... 阅读全文
posted @ 2017-05-29 07:21 墨智仁 阅读(81) 评论(0) 推荐(0)

2017年5月25日

摘要: product_list = [ ('手机',5000), ('电脑',6000), ('手表',20000), ('书',100), ('烟',65), ('酒',200), ] shopping_list=[] salary = input('你有多少钱:') if salary.isdigit(): #isdigit() 方法检测字符串是否只... 阅读全文
posted @ 2017-05-25 20:08 墨智仁 阅读(96) 评论(0) 推荐(0)

2017年5月21日

摘要: 数组的一些操作 关于数组复制 另外一些杂七杂八的 阅读全文
posted @ 2017-05-21 21:21 墨智仁 阅读(106) 评论(0) 推荐(0)

摘要: python 阅读全文
posted @ 2017-05-21 08:47 墨智仁 阅读(157) 评论(0) 推荐(0)