标签:pre 字符串 def print style color span 字符 abc
str = ‘abcdefg‘
str[首:尾:步长】 步长为负数的话是倒着取
1 str = ‘abcdef‘ 2 a1 = str[0:4:2] 3 print(a1) #ac 4 a2 = str[-1:1:-2] 5 print(a2) #fd
标签:pre 字符串 def print style color span 字符 abc
原文地址:https://www.cnblogs.com/yifengs/p/10546559.html