Python中str_1=“hello world”切片str_1[2:7]结果为

Python中str_1=“hello world”切片str_1[2:7]结果为

img

str_1[2:7] 是切片获取从下标2到下标7的前一个下标(只包含到下标6,不包含下标7)之间的字符组成新的字符串
'hello world'下标2的字符是'l',下标7的前一个的字符是'w'
就是'llo w'
如有帮助,望采纳!谢谢!

llo w