# 索引,下标,获取字符串中的某一个字符. test = 'MuMingJun' v = test[3] print(v) i # 切片 test = 'MuMingJun' v = test[0:-1] print(v) x = test[0:5] print(x) y = test[6:9] print(y) MuMingJu MuMin Jun # len 获取当前字符串中由几个字符组成 test = 'MuMingJun' v = len(test) print(v) 9 # 记住如果是…