python截串

来源:互联网 发布:长沙java培训 编辑:程序博客网 时间:2024/06/06 03:15

python截串

str[0:5]1-4

str[:]全部

str[4:]5个字符到末尾

str[:-3]从开始到倒数第三个

str[2]第三个

原创粉丝点击