主页
Python
Python List index() 方法
demo_ref_list_index
运行 ❯
×
更改方向
保存代码
更改主题
fruits = ['apple', 'banana', 'cherry'] x = fruits.index("cherry") print(x)
2