06 2018 档案

摘要:#1.salahFile = open('salah.txt',mode="r",encoding='utf-8')salahText = salahFile.read()salahFile.close()print(salahText)#2.replaceList = [',','.',"'",' 阅读全文
posted @ 2018-06-20 21:13 李凌正 阅读(111) 评论(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(7,'A','B','C') 阅读全文
posted @ 2018-06-13 21:01 李凌正 阅读(97) 评论(0) 推荐(0)
摘要:l = ['Michael','Bob','Tracy']l.append('Bob')l.pop()print(1)t = ('Michael','Bob','Tracy')scores = [85,65,55]d = {'Michael':85,'Bob':65,'Tracy':55}d['Bo 阅读全文
posted @ 2018-06-06 21:42 李凌正 阅读(129) 评论(0) 推荐(0)