摘要:
# -*- coding: utf-8 -*- def trim(s): if len(s)==0: return '' if s[:1]==' ': return trim(s[1:]) elif s[-1:]=='': return trim(s[:-1]) else: return s # 测 阅读全文
摘要:
# -*- coding: utf-8 -*- def move(n, a, b, c): if n==1: print(a,'==>',c)#只有一块的时候直接从A到C即可 else: move(n-1,a,c,b)#把n-1块从a先移到B print(a,'==>',c)#把第n块先从a先到c move(n-1,... 阅读全文