主页
Python
Python slice() 函数
demo_ref_slice2
运行 ❯
×
更改方向
保存代码
更改主题
a = ("a", "b", "c", "d", "e", "f", "g", "h") x = slice(3, 5) print(a[x])
('d', 'e')