Python字符串截取

>>> str1 = '0123456789' >>> print(str1[:-5]) 01234 >>> str1 = '0123456789' >>> print(str1[:-5:-3]) 96 >>> >>> str1 = '0123456789' >>> print(str1[-5:-3]) 56 >>> print(str1[:-1]) 012345678 >>> print(st
相關文章
相關標籤/搜索