学习笔记(47):Python 面试100讲(基于Python3.x)-如何反转字符串

立即学习:https://edu.csdn.net/course/play/26755/340115?utm_source=blogtoedu

 

反转字符串可以使用循环或分片

分片反转字符串:将步长设为-1,也就是s[::-1] 

发布了73 篇原创文章 · 获赞 3 · 访问量 675

猜你喜欢

转载自blog.csdn.net/weixin_43186090/article/details/104433078