2018年12月25日

摘要: 1. 写一个函数, 输入一个字符串, 返回倒序排列的结果: 如: string_reverse(‘abcdef’),返回: ‘fedcba’ (请采用多种方法实现) s = 'abcdef' l = list(s) l.sort(reverse=True) s = ''.join(l) print(s) s = 'abcdef' s1 = '' for i in s[::-1]: s1... 阅读全文
posted @ 2018-12-25 14:09 学府伊人醉 阅读(75) 评论(0) 推荐(0) 编辑

导航