Remove "x" number of characters from a string?
This question already has an answer here:
You can use this syntax called slices
s = 'gorilla'
s[2:]
will return
'rilla'
see also Explain Python's slice notation
链接地址: http://www.djcxy.com/p/55120.html下一篇: 从字符串中删除“x”个字符?