按索引取值
name='yryriw 9999ndlaanl'
print(name[0])
print(name[-1])
切片:步长为正数,从左到右切片;如果步长为负数
print(name[0:7])
print(name[0:7:2])
print(name[0::2])
print(name[-4::1])
print(name[-4
标签:内置,name,print,50,类型,步长,split,strip,字符串 From: https://www.cnblogs.com/nickyu511/p/17968647