06 2018 档案

摘要:#1. hryFile = open('hry.txt',mode='r',encoding='utf-8') hryText = hryFile.read() hryFile.close() print(hryText) #2. replaceList = [',',"'",'-','\n'] for c in replaceList: hryText = hryText.repla... 阅读全文
posted @ 2018-06-20 20:38 hry丿 阅读(125) 评论(0) 推荐(0)
摘要:def hanoi(n,a,b,c): if n==1: print(n,a+'->'+c) else: hanoi(n-1,a,c,b) print(n,a+'->'+c) hanoi(n-1,b,a,c) hanoi(6,'A','B','C') 阅读全文
posted @ 2018-06-13 21:02 hry丿 阅读(111) 评论(0) 推荐(0)
摘要:l = ['Michael','Bob','Tracy'] l.append('Bob') l.pop() print(1) t = ('Michael','Bob','Tracy') scores = [95,65,45] d = {'Michael':95,'Bob':65,'Tracy':45 阅读全文
posted @ 2018-06-06 21:25 hry丿 阅读(126) 评论(0) 推荐(0)