摘要:
1.题目: 在Python环境下用尽可能多的方法反转字符串,例如将s = "abcdef"反转成 "fedcba" 第一种:使用字符串切片 result = s[::-1] 第二种:使用列表的reverse方法 l = list(s) l.reverse() result = "".join(l) 阅读全文
posted @ 2021-02-25 16:45
Python探索牛
阅读(817)
评论(0)
推荐(0)