摘要: 1、案例解释 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 @ 2019-07-21 00:00 neozheng 阅读(20219) 评论(0) 推荐(2) 编辑