期末综合大作业:词频统计
摘要:#1, riverFile = open('river.txt','r') riverTest = riverFile.read() riverFile.close() print(riverTest) #2, print(riverTest.replace(',',' ')) print( riverTest.replace("'",' ')) print(riverTest) #3, ...
阅读全文
posted @
2018-06-20 19:35
苏俊康
阅读(136)
推荐(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)
阅读全文
posted @
2018-06-13 21:14
苏俊康
阅读(154)
推荐(0)