Loading...

摘要: # 方法1: ![](https://img2023.cnblogs.com/blog/1903425/202307/1903425-20230730222238547-649554865.png) ![](https://img2023.cnblogs.com/blog/1903425/20230 阅读全文
posted @ 2023-07-30 22:25 高宏宇 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ## 案例 ``` a='python' b=a[::-1] print(b) #nohtyp c=a[::-2] print(c) #nhy #从后往前数的话,最后一个位置为-1 d=a[:-1] #从位置0到位置-1之前的数 print(d) #pytho e=a[:-2] #从位置0到位置-2 阅读全文
posted @ 2023-07-30 11:59 高宏宇 阅读(83) 评论(0) 推荐(0) 编辑