python 递归一行实现字符串反转
摘要:
~~~py def myreverse2(s): return "" if not s or len(s) == 0 else myreverse2(s[1:]) + s[0] s2 = "1234567899988877654321" print(myreverse2(s2)) ~~~ 阅读全文
posted @ 2019-07-22 16:12 子狼 阅读(1009) 评论(0) 推荐(0) 编辑
posted @ 2019-07-22 16:12 子狼 阅读(1009) 评论(0) 推荐(0) 编辑