python学习随笔--string[:]



#strrev(sStr1) sStr1 = 'abcdefg' sStr1 = sStr1[::-1] print sStr1

字符串 [::-1] 出现string取反,string[:] 取全部,string[:-1] 取所有


原文地址:https://www.cnblogs.com/sungodzc/p/10021650.html