首页
科技
登录
6mi
u
盘
搜
搜 索
科技
python中str的索引、切片
python中str的索引、切片
it
2026-05-10
6
python中str的索引、切片 1 a = "hello" 2 a1 = a[1] 3 a2 = a[0:2] 4 print(a1) 5 print(a2)
我们通过索引获取字符串中指定位数的字符
通过切片获取指定区间范围的所有字符 范围大于等于开始小于末尾
posted on
2019-04-09 10:07
恒笛 阅读(
...
) 评论(
...
) 编辑 收藏
转载于:https://www.cnblogs.com/xwqhl/p/10675179.html
转载请注明原文地址: https://win8.8miu.com/read-1558385.html
最新回复
(
0
)