\\print("hello world")
s1="hello world"
print("s1[0:1]")
**he
print("s1[:]")
**hello world
print("s1[7:]")
**world
print("s1[::2]")
**hlowrd
python学习----字符分片索引
猜你喜欢
转载自blog.csdn.net/printfsome/article/details/81077315
今日推荐
周排行